Skip to content

Conversation

@higuchi-daisuke
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Japanese translation of the PostgreSQL ALTER TABLE documentation for version 18.0. The changes replace machine-translated and automatically matched text with cleaner, more natural Japanese translations while maintaining technical accuracy.

Key Changes:

  • Removal of machine translation markers (《機械翻訳》and 《マッチ度[...]》) and replacement with polished Japanese text
  • Improved translation consistency for technical terms like "格納生成列" (stored generated column) and "仮想生成列" (virtual generated column)
  • Better phrasing and natural Japanese sentence structure throughout
  • Updated terminology to reflect PostgreSQL 18.0 documentation standards

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

値はテーブルが書き換えられた時にのみ適用され、ラージテーブルに対しても<command>ALTER TABLE</command>非常に高速になります。
カラム制約が指定されていない場合、NULLは<literal>DEFAULT</literal>として使用されます。
どちらのケースでもテーブルの書き換えは必要ありません。
<literal>ADD COLUMN</literal>で列が追加されて非不安定(non-volatile)な<literal>DEFAULT</literal>が指定された場合、その文の実行時にデフォルト値が評価され、その結果がテーブルのメタデータに格納されます。
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "非不安定(non-volatile)" is awkward in Japanese. The standard technical translation for "non-volatile" in database/computing contexts is "非揮発性". Similarly, "不安定(volatile)" on line 2048 should be "揮発性(volatile)" for consistency with standard technical terminology. "不安定" literally means "unstable" which can be confusing, while "揮発性" specifically means "volatile" in the technical sense.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「非不安定(non-volatile)」の訳は、pg_attribute のドキュメントを参考にしました。
そのため、こちらは修正不要かなとは考えておりますが、他の方のご意見もうかがえればと思っております。

https://www.postgresql.jp/document/17/html/catalog-pg-attribute.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1266 がそのままになってたのも関係してますね。

個人的には、安定性や変動性のほうが馴染みがありますが、ちょっと違うので揮発性にかなと思います。
他のファイルも修正が必要になるのでマージしてから全体で修正するのが良いと思います。

-->
《機械翻訳》volatile<literal>カラム</literal>を持つデフォルト<function>clock_timestamp()</function>例:、stored generatedカラム、identityカラム、制約を持つドメインデータタイプを持つカラムを追加すると、テーブル全体とそのインデックスが書き換えられます。
virtual generatedカラムを追加しても、書き換えられることはありません
不安定(volatile)な<literal>DEFAULT</literal>(例えば、<function>clock_timestamp()</function>)を持つ列、格納生成列、識別列、または制約を持つドメインデータ型の列を追加すると、テーブル全体とそのインデックスが書き換えられます。
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "不安定(volatile)" should be "揮発性(volatile)" to match standard technical terminology in Japanese for database/computing contexts. "不安定" means "unstable" which is not the precise technical term, while "揮発性" specifically means "volatile" in the technical computing sense and would be consistent with the suggested change on line 2033.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらは、上記 copilot によるnon-volatileの指摘部分と対応させたため、このような訳としています。

つまり、親がNULLを許可している場合でも、子はNULLを許可しないことができますが、その逆はできません。
<literal>ONLY</literal>親テーブルから<literal>NOT NULL</literal>制約を削除しないを削除することもできます。
<literal>DROP NOT NULL</literal>
<literal>NOT NULL</literal>制約は親テーブルから<literal>のみ</literal>削除し、子テーブルからは削除しないこともできます。
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The literal tag should contain the SQL keyword "ONLY" in uppercase, not the Japanese translation "のみ". The English source text mentions "from ONLY the parent table", indicating this is a SQL keyword that should not be translated.

Suggested change
<literal>NOT NULL</literal>制約は親テーブルから<literal>のみ</literal>削除し、子テーブルからは削除しないこともできます。
<literal>NOT NULL</literal>制約は親テーブルから<literal>ONLY</literal>削除し、子テーブルからは削除しないこともできます。

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらも迷うところではありますが、SQL 文内のキーワードとして ONLY のまま残す場合、文章として成立しないような気がしたため、日本語に翻訳しています。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<literal>ONLY</literal>はSQLキーワードなので残すのが良いと思います。訳しづらいですが。
ここはSQLを文に入れて書いていて繰り返さないようにしているのでは...と思いました。

<literal>ONLY</literal>を使用して親テーブルから削除〜

のようにするしかないかなと思います。

原文も"from the parent table using <literal>ONLY</literal>" のようにしたほうがよいのでは...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。提案いただいたように修正します。
原文改善についてもコミュニティに提案してみようと思います。

その逆も同様です。
現在のところ、この方法で変更できるのは非NULL制約のみです。
制約の継承可能状態を変更することに加えて、継承できない制約が継承可能とマークされている場合、もしそのテーブルに子テーブルがあれば、同等の制約がそれらに追加されます。
子テーブルを持つテーブルで継承可能な制約を継承不可としてマークすると、子テーブルの対する制約はもはや継承されないものとしてマークされますが、削除はされません。
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing particle between "子テーブルの" and "対する". It should be "子テーブルの対応する制約" (corresponding constraint on children) not "子テーブルの対する制約".

Suggested change
子テーブルを持つテーブルで継承可能な制約を継承不可としてマークすると、子テーブルの対する制約はもはや継承されないものとしてマークされますが、削除はされません。
子テーブルを持つテーブルで継承可能な制約を継承不可としてマークすると、子テーブルの対応する制約はもはや継承されないものとしてマークされますが、削除はされません。

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらは対応します

@higuchi-daisuke
Copy link
Contributor Author

copilot の指摘事項を確認し、必要と判断した箇所を修正しました。

@higuchi-daisuke
Copy link
Contributor Author

レビューありがとうございます。いただいた内容を反映させました。

Copy link
Member

@noborus noborus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。
確認しました。

Copy link
Contributor

@KenichiroTanaka KenichiroTanaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応ありがとうございました。一通り確認しました。

@KenichiroTanaka KenichiroTanaka merged commit ae0a305 into pgsql-jp:doc_ja_18 Jan 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants