Search Postgresql Archives

Re: triggers and TriggerData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 21 January 2007 15:56, gustavo halperin 
<ggh.develop@xxxxxxxxx> wrote:
> First, thank you for your answers about my problem with the function
> 'CREATE TRIGGER',
> I have another question about triggers, how can I pass arguments ?? I
> read about some struct TriggerData *CurrentTriggerData, but I didn't
> found any explanation or example about how to use it in postgres SQL.
>  My problem is that  for any INSERT row in table 'B' I need to pass
> to the function trigger two values  of this row.  Do you know how to
> do so or where are examples of how to do it ??

You cannot pass values to a trigger.

However, insert triggers (in PLpgSQL at least) receive the row value in 
the NEW record variable.  There are examples in the documentation.

http://www.postgresql.org/docs/8.2/interactive/plpgsql-trigger.html#PLPGSQL-TRIGGER-EXAMPLE

-- 
"A government that robs Peter to pay Paul can always depend upon the 
support of Paul." - George Bernard Shaw



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux