Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Fetter" <david(at)fetter(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out
Date: 2006-07-21 02:46:27
Message-ID: 14692.1153449987@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David Fetter" <david(at)fetter(dot)org> writes:
> is there some way to let the right hand side of SET be the (TEXT) output of
> a function?

No. SET is a utility command and utility commands generally don't do
expression evaluation. (There are some specific reasons why not for
SET, but I won't get into that here.)

However, you can get the desired effect in various other ways; see the
set_config() function, or try updating the pg_settings view ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2006-07-21 03:08:00 Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out
Previous Message David Fetter 2006-07-21 01:40:40 BUG #2542: ALTER USER foo SET bar = func(baz) errors out