Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?) - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)
Date
Msg-id 20060522191505.GF64371@pervasive.com
Whole thread Raw
In response to Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Mon, May 22, 2006 at 08:45:07PM +0200, Martijn van Oosterhout wrote:
> On Mon, May 22, 2006 at 10:41:59AM -0500, Jim C. Nasby wrote:
> > > CREATE TRIGGER name { BEFORE | AFTER } { event [ OR ... ] }
> > >     ON table FOR EACH STATEMENT
> > >     EXECUTE PROCEDURE funcname ( arguments )
> >  
> > And that doesn't give you any information on the rows that were
> > modified. Other RDBMSes will provide a NEW rowset and an OLD rowset that
> > you can select from inside the trigger as if they were real tables.
> 
> Is this on the TODO list? It doesn't seem too difficult to create a

No.

> tuplestore and store the NEW and OLD tuples there and pass the whole
> set to the trigger.

I never thought about it being that easy, but yeah, it probably wouldn't
be terribly difficult.

Can we get this on the TODO? Or does someone want to just come up with a
patch if it's easy enough?
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: [pgsql-advocacy] [OT] MySQL is bad, but THIS bad?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: error-free disabling of individual child partition tables