You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
——row358,调英为:
commandINSERTcommand and commandUPDATEcommand operations only, the trigger
——row367,调翻为:
一个行级<literal>INSTEAD OF</literal>触发器可以返回<symbol>NULL</symbol>来指示它没有修改任何来自于视图底层基表的数据,也可以返回被传入的视图行(<command>INSERT</command>和<command>UPDATE</command>操作的<varname>NEW</varname>行,或者<command>DELETE</command>操作的<varname>OLD</varname>行)。一个非空返回值被用于标志触发器在视图中执行了必须的数据修改。这将会导致被命令修改的行计数被增加。仅对于<command>INSERT</command>和<command>UPDATE</command>操作,触发器可能会在返回<varname>NEW</varname>行之前对其进行修改。这将会改变<command>INSERT RETURNING</command>或<command>UPDATE RETURNING</command>返回的数据,并在视图无法正确地显示提供给它的相同数据时有用。
——row380至406,增英和翻为:
<!--==========================orignal english content==========================
<para>
Some considerations apply for generated
columns.<indexterm><primary>generated column</primary><secondary>in
triggers</secondary></indexterm> Stored generated columns are computed after
<literal>BEFORE</literal> triggers and before <literal>AFTER</literal>
triggers. Therefore, the generated value can be inspected in
<literal>AFTER</literal> triggers. In <literal>BEFORE</literal> triggers,
the <literal>OLD</literal> row contains the old generated value, as one
would expect, but the <literal>NEW</literal> row does not yet contain the
new generated value and should not be accessed. In the C language
interface, the content of the column is undefined at this point; a
higher-level programming language should prevent access to a stored
generated column in the <literal>NEW</literal> row in a
<literal>BEFORE</literal> trigger. Changes to the value of a generated
column in a <literal>BEFORE</literal> trigger are ignored and will be
overwritten.
</para>
____________________________________________________________________________-->
<para>
一些情况适用于生成的列。
<indexterm><primary>generated column</primary><secondary>in triggers</secondary></indexterm> 存储生成的列在<literal>BEFORE</literal> 触发器之后和 <literal>AFTER</literal> 触发器之前计算.
因此,生成的值可以在<literal>AFTER</literal>触发器中检查。
在<literal>BEFORE</literal>触发器中,<literal>OLD</literal>行包含旧的生成的值,正如人们所期待的,但 <literal>NEW</literal> 行尚未包含新的生成值并且不应访问。
在C语言界面中,此时列的内容还没有被定义;在<literal>BEFORE</literal>触发器中,高级别编程语言应阻止访问<literal>NEW</literal>行中存储生成的列,。
在<literal>BEFORE</literal>触发器中更改到生成列的值将被忽略并覆盖。
</para>
——row789至790,调英为:
TupleTableSlot *tg_trigslot;
TupleTableSlot *tg_newslot;
——row1050至1051,调翻为:
TupleTableSlot *tg_trigslot;
TupleTableSlot *tg_newslot;
——row992至996,调英为:
<term><structfield>tg_trigslot</structfield></term>
<listitem>
<para>
The slot containing <structfield>tg_trigtuple</structfield>,
or a <symbol>NULL</symbol> pointer if there is no such tuple.
——row1225至1228,调翻为:
<term><structfield>tg_trigtuplebuf</structfield></term>
<listitem>
<para>
包含<structfield>tg_trigtuple</structfield>的插槽。或者一个<symbol>NULL</symbol>指针,如果没有这样的元组的话。
——row1002至1006,调英为:
<term><structfield>tg_newslot</structfield></term>
<listitem>
<para>
The slot containing <structfield>tg_newtuple</structfield>,
or a <symbol>NULL</symbol> pointer if there is no such tuple.
——row1234至1237,调翻为:
<term><structfield>tg_newtuplebuf</structfield></term>
<listitem>
<para>
包含<structfield>tg_trigtuple</structfield>的插槽。或者一个<symbol>NULL</symbol>指针,如果没有这样的元组的话。
0 commit comments