Please help explain how to use triggers with LANGUAGE SQL to enforce
assertions or complex schema-wide multiple-table constraints, firing "before
... on insert or update".
Perhaps this is also a topic for the Documentation forum, as it doesn't seem
to be present in the current docs.
Are there functionalities only available in functions written in LANGUAGE
SQL (my preference) or conversely, any which are unavailable when
implementing the handler function with SQL?
* How can the function access the values from the triggering insert/update
* What does it mean to specify "RETURNS TRIGGER"?
* Specifically, Do I specify the return type (s) somehow?
* How does one specify the values to be returned?
* HOw, based upon the outcome of the function, can the original statement's
values either be used to complete the insert/update, or else be discarded?
* Is there a way to generate an error message, like those reported when a
regular check constraint is violated?
** Where can I find examples of such constraint-enforcing triggers
implemented in Language SQL?
pgsql-novice by date
|Next:||From: Anirban Pal||Date: 2009-06-05 05:56:36|
|Subject: How to know the indexes on a Table|
|Previous:||From: Tom Lane||Date: 2009-06-04 23:12:39|
|Subject: Re: Re: postgres C function returning SETOF record gives RECORD TYPE NOT REGISTERED |