Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-10 Thread Alvaro Herrera
Martin Edlman wrote: > |> I don't want to rewrite whole trigger to plPerl as I would have to use > |> DBD-PgSPI. > | > | Huh? Certainly not -- there are functions in PL/Perl for this. See > | spi_exec_query in > | http://www.postgresql.org/docs/8.3/static/plperl-database.html > > Oh, I see. I ha

Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-10 Thread Martin Edlman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 |> I don't want to rewrite whole trigger to plPerl as I would have to use |> DBD-PgSPI. | | Huh? Certainly not -- there are functions in PL/Perl for this. See | spi_exec_query in | http://www.postgresql.org/docs/8.3/static/plperl-database.html Oh,

Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-08 Thread Alvaro Herrera
Martin Edlman wrote: > I don't want to rewrite whole trigger to plPerl as I would have to use > DBD-PgSPI. Huh? Certainly not -- there are functions in PL/Perl for this. See spi_exec_query in http://www.postgresql.org/docs/8.3/static/plperl-database.html -- Alvaro Herrera

Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-08 Thread Martin Edlman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, | no, it's not possible in plpgsql. Please, use plperl or plpython. thanks for the response. It's as I expected and was afraid of :-( I select data from DB using pl/PgSQL in the replace_values trigger and then call plPerl function which retu

Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-07 Thread Pavel Stehule
Hello no, it's not possible in plpgsql. Please, use plperl or plpython. Regards Pavel Stehule On 07/04/2008, Martin Edlman <[EMAIL PROTECTED]> wrote: > Hello, > > is it possible to use variables as field names in the NEW record? > Let's suppose I have a varchar attname containg the name