Re: can I define own variables? - Mailing list pgsql-general

From Tom Lane
Subject Re: can I define own variables?
Date
Msg-id 15520.1192544477@sss.pgh.pa.us
Whole thread Raw
In response to Re: can I define own variables?  (Guy Rouillier <guyr-ml1@burntmail.com>)
List pgsql-general
Guy Rouillier <guyr-ml1@burntmail.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

pgsql-general by date:

Previous
From: Lee Keel
Date:
Subject: Re: Convert bytea to Float8
Next
From: "Albe Laurenz"
Date:
Subject: Re: Inconsistence in transaction isolation docs