Re: Triggers: FROM Inserted - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: Triggers: FROM Inserted
Date
Msg-id 20070914061832.GA7443@a-kretschmer.de
Whole thread Raw
In response to Triggers: FROM Inserted  ("Peter Stow" <peters@BarwonHealth.org.au>)
List pgsql-novice
am  Fri, dem 14.09.2007, um 15:54:44 +1000 mailte Peter Stow folgendes:
>
> Hi
>
> I am trying to migrate an application from MS SQL Server to Postgres.  In MS
> SQL triggers I have been used to declaring variables inserted into a table
> using the syntax 'SELECT . . . FROM Inserted'.  Can anyone tell me if it is
> possible to use the same syntax (ie FROM Inserted) in Postgres?  If not, is

No.


> there an alternative?

Yes ;-)

You can use NEW and OLD - variables. Read more about this:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-trigger.html


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-novice by date:

Previous
From: "Peter Stow"
Date:
Subject: Triggers: FROM Inserted
Next
From: "Jonathon Stierman"
Date:
Subject: import a .out file