Re: can I define own variables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guy Rouillier <guyr-ml1(at)burntmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can I define own variables?
Date: 2007-10-16 14:21:17
Message-ID: 15520.1192544477@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Guy Rouillier <guyr-ml1(at)burntmail(dot)com> writes:
> In short, why isn't the
> following legal in a PL/pgsql procedure:

> NEW.user_name := (SHOW uservars.user_name);

Because that isn't a legal SQL subexpression. (This isn't really the
approved way of using SELECT, either, since what you're writing is
a redundant sub-SELECT.) It seems that this works in recent plpgsql
versions, FWIW:

show autovacuum into r;

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-10-16 14:33:43 Re: Inconsistence in transaction isolation docs
Previous Message Scott Marlowe 2007-10-16 14:05:09 Re: PostgreSQL as a backend for Wizcon 9.2