Skip to content

charset.sgmlのPostgreSQL 17.0対応です。#3173

Merged
KenichiroTanaka merged 4 commits intopgsql-jp:doc_ja_17from
tatsuo-ishii:charset170
Jan 5, 2025
Merged

charset.sgmlのPostgreSQL 17.0対応です。#3173
KenichiroTanaka merged 4 commits intopgsql-jp:doc_ja_17from
tatsuo-ishii:charset170

Conversation

@tatsuo-ishii
Copy link
Contributor

No description provided.

collations and character classifications.
-->
《機械翻訳》ロケールプロバイダは、照合と文字分類のライブラリ動作を定義するロケールを指定します
ロケールプロバイダは、照合と文字分類のロケール動作を定義するライブラリを指定します
Copy link
Member

Choose a reason for hiding this comment

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

照合順序で統一で良いのではないでしょうか。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

でも、"collation order"っていうのも出てくるんですよね。"collation"も"collation order"も「照合順序」と訳してしまうと区別がつかなくなるので、単独の"collation"をここでは「照合」と訳しています。

Copy link
Member

Choose a reason for hiding this comment

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

確かに"collation"を照合"collation order"を照合順序とした方がすっきりしますが、
他で統一されてなくて"collation"を照合順序としている場合が多いです。
統一されていないのでissueを立てます。

《機械翻訳》<literal>C</literal>と<literal>POSIX</literal>の照合は、<quote>従来のC</quote>の動作に基づいています。
ソート言語のバイトではなくオーダー値で照合され、ASCII文字<quote><literal>A</literal></quote>から<quote><literal>Z</literal></quote>までのみが文字として扱われます
この動作は効率的であり、特定のデータベースエンコーディングのすべてのバージョンで安定(stable)ですが、動作はデータベースのエンコーディングによって異なる場合があります。
<literal>C</literal>と<literal>POSIX</literal>の照合は、<quote>従来のC</quote>の動作に基づいています。
Copy link
Member

Choose a reason for hiding this comment

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

ここの照合順序で良いと思います。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

同上です。

at database creation time.
-->
《機械翻訳》<literal>デフォルト</literal>照合順序は、ロケールの作成時に指定したデータベースを選択します
<literal>デフォルト</literal>照合順序は、データベース作成時に指定したロケールを選択します
Copy link
Member

Choose a reason for hiding this comment

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

ここは<literal>default</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.

おっと、そうですね。

-->
《機械翻訳》オペレーティングシステムサポートによっては、追加の照合を使用できる場合があります。
オペレーティングシステムサポートによっては、追加の照合を使用できる場合があります。
これらの追加の照合の効率性と安定度は、照合順序プロバイダ、プロバイダバージョン、およびロケールによって異なります。
Copy link
Member

Choose a reason for hiding this comment

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

ここも照合順序。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

同上。

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.

一通り確認しました。
照合→照合順序への統一と<literal>default</literal>の確認をお願いします。

"collation order"と"collation" (oderなし)をどうするかを除き、対応しています。
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.

ありがとうございます。確認しました。
collationは全体で見直して修正するということでここではおいておきます。

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.

いくつか気づいたところがありますので見ていただいてもいいでしょうか。

《機械翻訳》<literal>C.UTF-8</literal>ロケールは、データベースエンコーディングが<literal>UTF-8</literal>であり、動作がUnicodeに基づいている場合にのみ使用できます。
<literal>C.UTF-8</literal>ロケールは、データベースエンコーディングが<literal>UTF-8</literal>であり、動作がUnicodeに基づいている場合にのみ使用できます。
照合順序はコードポイント値のみを使用します。
正規表現文字クラスは"POSIX Compatible"セマンティクスに基づいており、ケースマッピングは"シンプル"バリアントです。
Copy link
Contributor

Choose a reason for hiding this comment

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

機械翻訳の箇所ですがvariantがカタカナのままですがどうしましょう。
他では亜種、変種などと訳されています(これも統一したいですね)。

$find . -name ".sgml"|xargs grep 亜種|wc -l
26
$find . -name "
.sgml"|xargs grep 変種|wc -l
17

あまり差がないですが亜種に揃えるといいでしょうか?
(文脈で変種が良いケースはパッと見つけられませんでした)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

他に「異型」という訳も使われています。
find . -name '*.sgml'|xargs grep 異型|wc -l
5
出現数としては少ないので、「亜種」に統一します。

-->
《機械翻訳》<literal>icu</literal>プロバイダーは、外部ICU<indexterm><primary>ICU</primary></indexterm>ライブラリを使用します。
<literal>icu</literal>プロバイダは、外部ICU<indexterm><primary>ICU</primary></indexterm>ライブラリを使用します。
<productname>PostgreSQL</productname>サポートが設定されている必要があります。
Copy link
Contributor

Choose a reason for hiding this comment

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

機械翻訳の箇所ですが、これはinitdb時に--locale-provider=icuがつけられてる必要があることを指しているのかと思います。
ですので、
「PostgreSQLがサポート付きで設定されている必要があります。」
もう少し意訳して
「PostgreSQLがICUサポート付きで設定されている必要があります。」
(やりすぎかもです)
などとするのはどうでしょうか。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

「PostgreSQLがサポート付きで設定されている必要があります。」はちょっと意味がよくわからないので、「PostgreSQLがICUサポート付きで設定されている必要があります。」に賛成です。

すべてのエンコーディングで使用できます。
この照合順序を使用するにはICUサポートが必要であり、PostgresがICUの別のバージョンで構築されている場合は動作が変更される可能性があります(この照合順序はICUルートロケールと同じ動作をします。
<xref linkend="collation-managing-predefined-icu-und-x-icu"/>を参照してください。)
(この照合順序は、ICU rootロケールと同じ動作をします。<xref linkend="collation-managing-predefined-icu-und-x-icu"/>を参照してください。)
Copy link
Contributor

Choose a reason for hiding this comment

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

直前の行でicu root localeはカタカナで「ICUルートロケール」とされています。
こちらもカタカナが良いかと思います。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

「ICUルートロケール」としました。

《機械翻訳》この照合順序は、自然言語のコードポイントではなく、Unicodeのオーダー値でソートされます
この照合順序による並べ替えでは、自然言語の並び順ではなく、Unicodeのコードポイント値を使用してソートされます
関数<function>lower</function>、<function>initcap</function>、<function>upper</function>には、Unicodeシンプルケースマッピングを使用します。
パターンマッチ(正規表現を含む)の場合は、POSIX互換のUnicode<ulink url="https://www.unicode.org/reports/tr18/#Compatibility_Properties">互換性プロパティを使用します</ulink>。
Copy link
Contributor

Choose a reason for hiding this comment

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

POSIX Compatible variantのvariantを訳出すべきか判断できていません。
互換に亜種のニュアンスを含むのでこのままでもいい気がしています。
(どなたかご意見いただけないでしょうか)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

リンク先の表Annex C: Compatibility Propertiesを見ると、Unicode標準とPOSIX標準を対比させる形で解説しており、ここではPostgreSQLはUnicode標準ではなく、POSIX標準の方を使っているという意図が込められていると思います。だとすると、variantを訳出した方がよいと思い、variantを訳すように修正してみました。

Copy link
Contributor Author

@tatsuo-ishii tatsuo-ishii left a comment

Choose a reason for hiding this comment

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

レビューありがとうございます。

《機械翻訳》<literal>C.UTF-8</literal>ロケールは、データベースエンコーディングが<literal>UTF-8</literal>であり、動作がUnicodeに基づいている場合にのみ使用できます。
<literal>C.UTF-8</literal>ロケールは、データベースエンコーディングが<literal>UTF-8</literal>であり、動作がUnicodeに基づいている場合にのみ使用できます。
照合順序はコードポイント値のみを使用します。
正規表現文字クラスは"POSIX Compatible"セマンティクスに基づいており、ケースマッピングは"シンプル"バリアントです。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

他に「異型」という訳も使われています。
find . -name '*.sgml'|xargs grep 異型|wc -l
5
出現数としては少ないので、「亜種」に統一します。

-->
《機械翻訳》<literal>icu</literal>プロバイダーは、外部ICU<indexterm><primary>ICU</primary></indexterm>ライブラリを使用します。
<literal>icu</literal>プロバイダは、外部ICU<indexterm><primary>ICU</primary></indexterm>ライブラリを使用します。
<productname>PostgreSQL</productname>サポートが設定されている必要があります。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

「PostgreSQLがサポート付きで設定されている必要があります。」はちょっと意味がよくわからないので、「PostgreSQLがICUサポート付きで設定されている必要があります。」に賛成です。

すべてのエンコーディングで使用できます。
この照合順序を使用するにはICUサポートが必要であり、PostgresがICUの別のバージョンで構築されている場合は動作が変更される可能性があります(この照合順序はICUルートロケールと同じ動作をします。
<xref linkend="collation-managing-predefined-icu-und-x-icu"/>を参照してください。)
(この照合順序は、ICU rootロケールと同じ動作をします。<xref linkend="collation-managing-predefined-icu-und-x-icu"/>を参照してください。)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

「ICUルートロケール」としました。

《機械翻訳》この照合順序は、自然言語のコードポイントではなく、Unicodeのオーダー値でソートされます
この照合順序による並べ替えでは、自然言語の並び順ではなく、Unicodeのコードポイント値を使用してソートされます
関数<function>lower</function>、<function>initcap</function>、<function>upper</function>には、Unicodeシンプルケースマッピングを使用します。
パターンマッチ(正規表現を含む)の場合は、POSIX互換のUnicode<ulink url="https://www.unicode.org/reports/tr18/#Compatibility_Properties">互換性プロパティを使用します</ulink>。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

リンク先の表Annex C: Compatibility Propertiesを見ると、Unicode標準とPOSIX標準を対比させる形で解説しており、ここではPostgreSQLはUnicode標準ではなく、POSIX標準の方を使っているという意図が込められていると思います。だとすると、variantを訳出した方がよいと思い、variantを訳すように修正してみました。

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 0dbbf3a into pgsql-jp:doc_ja_17 Jan 5, 2025
2 checks passed
@tatsuo-ishii tatsuo-ishii deleted the charset170 branch October 4, 2025 06:55
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