vefmaxi.blogg.se

Tg pro log
Tg pro log











Thus, if the trigger function wants the triggering action to succeed normally without altering the row value, NEW (or a value equal thereto) has to be returned. Returning a row value different from the original value of NEW alters the row that will be inserted or updated. If a nonnull value is returned then the operation proceeds with that row value. Row-level triggers fired BEFORE can return null to signal the trigger manager to skip the rest of the operation for this row (i.e., subsequent triggers are not fired, and the INSERT/ UPDATE/ DELETE does not occur for this row). Invalid indexes (less than 0 or greater than or equal to tg_nargs) result in a null value.Ī trigger function must return either NULL or a record/row value having exactly the structure of the table the trigger was fired for. TG_ARGVĭata type array of text the arguments from the CREATE TRIGGER statement. TG_NARGSĭata type integer the number of arguments given to the trigger function in the CREATE TRIGGER statement. TG_TABLE_SCHEMAĭata type name the name of the schema of the table that caused the trigger invocation. TG_TABLE_NAMEĭata type name the name of the table that caused the trigger invocation. This is now deprecated, and could disappear in a future release. TG_RELNAMEĭata type name the name of the table that caused the trigger invocation. TG_RELIDĭata type oid the object ID of the table that caused the trigger invocation. TG_OPĭata type text a string of INSERT, UPDATE, DELETE, or TRUNCATE telling for which operation the trigger was fired. TG_LEVELĭata type text a string of either ROW or STATEMENT depending on the trigger's definition.

tg pro log

TG_WHENĭata type text a string of BEFORE, AFTER, or INSTEAD OF, depending on the trigger's definition. TG_NAMEĭata type name variable that contains the name of the trigger actually fired.

tg pro log

This variable is null in statement-level triggers and for INSERT operations. OLDĭata type RECORD variable holding the old database row for UPDATE/ DELETE operations in row-level triggers. This variable is null in statement-level triggers and for DELETE operations.

Tg pro log update#

Data type RECORD variable holding the new database row for INSERT/ UPDATE operations in row-level triggers.











Tg pro log