Re: [GENERAL] triggers: dynamic references to fields in NEW and OLD?

2008-05-16 Thread Kerri Reno
; EMail: [EMAIL PROTECTED] > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Yuma Educational Computer Consortium Compass Development Team Kerri Reno [EMAIL PROTECTED] (928) 502-4240 .·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.

Re: [GENERAL] Is this possible in a trigger?

2008-05-07 Thread Kerri Reno
ssumes the table has an oid, if you have your own id #, use it qry = 'INSERT INTO log_audit (table, id, change) values (%s,%s,'%s')" % \ (tblname,TD['new'][oid],changes ) plpy.debug('qry:',qry) result = plpy.execute(qry) plpy.execute('NOTIFY LOGAUDITCHANGE') return None $BODY$ LANGUAGE 'plpythonu'; -- Yuma Educational Computer Consortium Compass Development Team Kerri Reno [EMAIL PROTECTED] (928) 502-4240 .·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.

Re: [GENERAL] Is this possible in a trigger?

2008-05-06 Thread Kerri Reno
| arecord.columnname || ' was ' || oldval || ' > now ' || newval; > end loop; > execute 'drop table oldblah'; > execute 'drop table newblah'; > > performance could be awful though. > > klint. > > -- > Klint Gore > Databas

Re: FW: Re: [GENERAL] create temp in function

2008-04-23 Thread Kerri Reno
Thanks for all who helped me with this. I just upgraded our one remaining database to 8.2 and EXECUTE INTO worked great. THANKS! Kerri On 4/22/08, Klint Gore <[EMAIL PROTECTED]> wrote: > > Kerri Reno wrote: > > > So the reason I'm getting the error is that I'm ru

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
So the reason I'm getting the error is that I'm running it in 8.0. Thanks so much for your help! Kerri On 4/22/08, Adrian Klaver <[EMAIL PROTECTED]> wrote: > > On Tuesday 22 April 2008 6:26 am, Kerri Reno wrote: > > > http://www.postgresql.org/docs/8.2/static/pl

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
TE TEMP TABLE a ...'; > a) > EXECUTE 'SELECT * FROM a WHERE ...' INTO somevars; > b) > FOR vars IN EXECUTE 'SELECT * FROM .. ' LOOP > > Regards > > Pavel Stehule > > > > -- Yuma Educational Computer Consortium Compass Development Team Kerri Reno [EMAIL PROTECTED] (928) 502-4240 .·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
explain what you mean by the "restriction to do SELECT INTO"? > > > > Why are you using a temp table to begin with? > > > > > > > > Jon > > > -- > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTE

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
ch! Kerri On 4/21/08, Adrian Klaver <[EMAIL PROTECTED]> wrote: > > -- Original message -- > From: "Kerri Reno" <[EMAIL PROTECTED]> > > Adrian, > > > > I don't understand. Why do I need to use execute? It runs fine the > first >

Re: [GENERAL] Schema migration tools?

2008-04-22 Thread Kerri Reno
oes anything like this exist? If not, I might have a new project... > > Thanks! > -- Christophe > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Yuma Educational Computer Consortium Compass Development Team Kerri Reno [EMAIL PROTECTED] (928) 502-4240 .·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.

Re: FW: Re: [GENERAL] create temp in function

2008-04-21 Thread Kerri Reno
e: > > Forgot to hit reply all. > > - Forwarded Message: -- > From: [EMAIL PROTECTED] (Adrian Klaver) > To: "Kerri Reno" <[EMAIL PROTECTED]> > Subject: Re: [GENERAL] create temp in function > Date: Mon, 21 Apr

[GENERAL] create temp in function

2008-04-21 Thread Kerri Reno
; $body$ language plpgsql security definer; Can anyone please help me with this? TIA, Kerri -- Yuma Educational Computer Consortium Compass Development Team Kerri Reno [EMAIL PROTECTED] (928) 502-4240 .·:*¨¨*:·. .·:*¨¨*:·. .·:*¨¨*:·.

[GENERAL] Fwd: create temp in function

2008-04-21 Thread Kerri Reno
BTW, this happens the same in PostgreSQL 8.0 and 8.2. Thanks! Kerri -- Forwarded message -- From: Kerri Reno <[EMAIL PROTECTED]> Date: Apr 21, 2008 3:22 PM Subject: create temp in function To: pgsql-general@postgresql.org Hi All! I'm new to this list, but I've b