|
58 | 58 | placeholders in the format string, or an error is raised during |
59 | 59 | the compilation of the function. |
60 | 60 | </span> |
61 | | -《マッチ度[88.180611]》もしあれば<em class="replaceable"><code>level</code></em>の後に<em class="replaceable"><code>format</code></em>文字列を指定できます |
62 | | -(これは評価式ではなく、単純文字列リテラルでなければなりません)。 |
| 61 | +最初の構文の形式では、もし<em class="replaceable"><code>level</code></em>があればその後に<em class="replaceable"><code>format</code></em>文字列を記述します(これは評価式ではなく、単純な文字列リテラルでなければなりません)。 |
63 | 62 | 書式文字列は報告されるエラーメッセージテキストを指定します。 |
| 63 | +書式文字列の後には、メッセージに挿入される省略可能な引数の式を指定できます。 |
64 | 64 | 書式文字列内では、<code class="literal">%</code>は次の省略可能な引数の値の文字列表現で書き換えられます。 |
65 | 65 | <code class="literal">%%</code>と記述することで<code class="literal">%</code>リテラルを表すことができます。 |
66 | 66 | 引数の数は書式文字列のプレースホルダ<code class="literal">%</code>の数と一致しなければいけません。さもなくば、関数のコンパイル時にエラーが起きます。 |
67 | | -《機械翻訳》最初の構文バリアントでは、<em class="replaceable"><code>レベル</code></em>があればその後に<em class="replaceable"><code>フォーマット</code></em>文字列を記述します(これは式ではなくシンプル文字列リテラルである必要があります)。 |
68 | | -フォーマット文字列は、レポートされるエラーメッセージテキストを指定します。 |
69 | | -フォーマット文字列の後には、メッセージに挿入されるオプショナル引数式を続けることができます。 |
70 | | -フォーマット文字列の内部では、<code class="literal">%</code>は次のオプショナル引数の値の文字列表現形式に置き換えられます。 |
71 | | -Write <code class="literal">%%</code>リテラル<code class="literal">%</code>を発行します。 |
72 | | -引数の数は、フォーマット内の<code class="literal">%</code>プレースホルダの数を✔する必要があります。 |
73 | | -そうしないと、のコンパイル中に発生します。 |
74 | | -エラー関数文字列マッチ |
75 | 67 | </p><p> |
76 | 68 | <span class="original"> |
77 | 69 | In this example, the value of <literal>v_job_id</literal> will replace the |
|
90 | 82 | See <xref linkend="errcodes-appendix"/> for the valid error condition |
91 | 83 | names and the predefined SQLSTATE codes. |
92 | 84 | </span> |
93 | | -《機械翻訳》2番目と3番目の構文構文では、<em class="replaceable"><code>condition_name</code></em>と<em class="replaceable"><code>sqlstate</code></em>はそれぞれエラー条件名前または5文字のSQLSTATEコードを指定します。 |
| 85 | +2番目と3番目の構文の形式では、<em class="replaceable"><code>condition_name</code></em>と<em class="replaceable"><code>sqlstate</code></em>はそれぞれエラー条件名と5文字のSQLSTATEコードを指定します。 |
94 | 86 | 有効なエラー条件名と定義済みのSQLSTATEコードについては<a class="xref" href="errcodes-appendix.html" title="付録A PostgreSQLエラーコード">付録A</a>を参照してください。 |
95 | 87 | </p><p> |
96 | 88 | <span class="original"> |
97 | 89 | Here are examples |
98 | 90 | of <replaceable class="parameter">condition_name</replaceable> |
99 | 91 | and <replaceable class="parameter">sqlstate</replaceable> usage: |
100 | 92 | </span> |
101 | | -《機械翻訳》次に、<em class="replaceable"><code>condition_name</code></em>と<em class="replaceable"><code>sqlstate</code></em>の使用法: |
| 93 | +以下は、<em class="replaceable"><code>condition_name</code></em>と<em class="replaceable"><code>sqlstate</code></em>の使用方法の例です。 |
102 | 94 | </p><pre class="programlisting"> |
103 | 95 | RAISE division_by_zero; |
104 | 96 | RAISE WARNING SQLSTATE '22012'; |
|
114 | 106 | string-valued expression. The allowed <replaceable |
115 | 107 | class="parameter">option</replaceable> key words are: |
116 | 108 | </span> |
117 | | -《マッチ度[87.037037]》<code class="literal">USING</code>に続いて、<em class="replaceable"><code>option</code></em> = <em class="replaceable"><code>expression</code></em>項目を記載することで、エラー報告に追加の情報を加えることができます。 |
| 109 | +いずれの構文の形式でも、<code class="literal">USING</code>の後に<em class="replaceable"><code>option</code></em> = <em class="replaceable"><code>expression</code></em>の項目を記述することで、エラー報告に追加の情報を加えることができます。 |
118 | 110 | 各<em class="replaceable"><code>expression</code></em>は、どのような文字列による式も可能です。 |
119 | 111 | 使用可能な<em class="replaceable"><code>option</code></em>キーワードは以下です。 |
120 | | -《機械翻訳》これらの構文バリアントのいずれでも、次のように記述することで、エラーレポートに追加情報をアタッチできます。 |
121 | | -<code class="literal">USING</code>後に<em class="replaceable"><code>option</code></em>=<em class="replaceable"><code>expression</code></em> items. each <em class="replaceable"><code>expression</code></em>は、文字列の値を持つ任意の式です。 |
122 | | -許可される<em class="replaceable"><code>option</code></em>キーの語は:です。 |
123 | 112 |
|
124 | | - </p><div class="variablelist" id="RAISE-USING-OPTIONS"><dl class="variablelist"><dt id="RAISE-USING-OPTION-MESSAGE"><span class="term"><code class="literal">MESSAGE</code></span> <a href="#RAISE-USING-OPTION-MESSAGE" class="id_link">#</a></dt><dd><p>Sets the error message text. This option can't be used in the |
125 | | - first syntax variant, since the message is already supplied.</p></dd><dt id="RAISE-USING-OPTION-DETAIL"><span class="term"><code class="literal">DETAIL</code></span> <a href="#RAISE-USING-OPTION-DETAIL" class="id_link">#</a></dt><dd><span class="original"> |
| 113 | + </p><div class="variablelist" id="RAISE-USING-OPTIONS"><dl class="variablelist"><dt id="RAISE-USING-OPTION-MESSAGE"><span class="term"><code class="literal">MESSAGE</code></span> <a href="#RAISE-USING-OPTION-MESSAGE" class="id_link">#</a></dt><dd><span class="original"> |
| 114 | + <para>Sets the error message text. This option can't be used in the |
| 115 | + first syntax variant, since the message is already supplied.</para> |
| 116 | +</span><p> |
| 117 | +エラーメッセージテキストを指定します。 |
| 118 | +このオプションは、既にメッセージが指定されている最初の構文の形式では使用できません。 |
| 119 | + </p></dd><dt id="RAISE-USING-OPTION-DETAIL"><span class="term"><code class="literal">DETAIL</code></span> <a href="#RAISE-USING-OPTION-DETAIL" class="id_link">#</a></dt><dd><span class="original"> |
126 | 120 | <para>Supplies an error detail message.</para> |
127 | 121 | </span><p>エラー詳細メッセージを出力します。</p></dd><dt id="RAISE-USING-OPTION-HINT"><span class="term"><code class="literal">HINT</code></span> <a href="#RAISE-USING-OPTION-HINT" class="id_link">#</a></dt><dd><span class="original"> |
128 | 122 | <para>Supplies a hint message.</para> |
|
133 | 127 | second or third syntax variant, since the error code is already |
134 | 128 | supplied.</para> |
135 | 129 | </span><p> |
136 | | -《マッチ度[54.861111]》<a class="xref" href="errcodes-appendix.html" title="付録A PostgreSQLエラーコード">付録A</a>で示されている状況名、または直接的に5文字によるSQLSTATEコードのいずれかで、報告すべきエラーコード(SQLSTATE)を指定します。 |
137 | | -《機械翻訳》エラーコード(SQLSTATE)をレポートに指定します。 |
138 | | -<a class="xref" href="errcodes-appendix.html" title="付録A PostgreSQLエラーコード">付録A</a>で示されるように条件名前によって、または5文字のSQLSTATEコードとして直接指定します。 |
139 | | -エラー構文はすでに提供されるであるため、このオプションは2番目または3番目のコードバリアントでは使用できません。 |
| 130 | +報告するエラーコード(SQLSTATE)を、<a class="xref" href="errcodes-appendix.html" title="付録A PostgreSQLエラーコード">付録A</a>で示されている条件名で指定するか、または5文字のSQLSTATEコードで直接指定します。 |
| 131 | +このオプションは、既にエラーコードが指定されている2番目と3番目の構文の形式では使用できません。 |
140 | 132 | </p></dd><dt id="RAISE-USING-OPTION-COLUMN"><span class="term"><code class="literal">COLUMN</code><br /></span><span class="term"><code class="literal">CONSTRAINT</code><br /></span><span class="term"><code class="literal">DATATYPE</code><br /></span><span class="term"><code class="literal">TABLE</code><br /></span><span class="term"><code class="literal">SCHEMA</code></span> <a href="#RAISE-USING-OPTION-COLUMN" class="id_link">#</a></dt><dd><span class="original"> |
141 | 133 | <para>Supplies the name of a related object.</para> |
142 | 134 | </span><p>関連するオブジェクト名を出力します。</p></dd></dl></div><p> |
|
162 | 154 | <span class="original"> |
163 | 155 | Another way to produce the same result is: |
164 | 156 | </span> |
165 | | -《機械翻訳》同じ結果を得るもう1つの方法は、です。 |
| 157 | +以下は、同じ結果になる別の方法です。 |
166 | 158 | </p><pre class="programlisting"> |
167 | 159 | RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; |
168 | 160 | </pre><p> |
|
173 | 165 | <replaceable class="parameter">level</replaceable> USING</literal> and put |
174 | 166 | everything else into the <literal>USING</literal> list. |
175 | 167 | </span> |
176 | | -《マッチ度[80.161943]》他にも亜種があり、<code class="literal">RAISE USING</code> または <code class="literal">RAISE <em class="replaceable"><code>level</code></em> USING</code>と記述して、全て一括して<code class="literal">USING</code>リスト内に書き加えます。 |
177 | | -《機械翻訳》構文の4番目のバリエーションに示されているように、<code class="literal">RAISE USING</code>または<code class="literal">RAISE <em class="replaceable"><code>level</code></em> USING</code>そして他のすべてを<code class="literal">USING</code>リストに入れると書くこともできます。 |
| 168 | +4番目の構文の形式で示されているように、<code class="literal">RAISE USING</code>または<code class="literal">RAISE <em class="replaceable"><code>level</code></em> USING</code>と記述して、全て一括して<code class="literal">USING</code>リスト内に書き加えることも可能です。 |
178 | 169 | </p><p> |
179 | 170 | <span class="original"> |
180 | 171 | The last variant of <command>RAISE</command> has no parameters at all. |
|
0 commit comments