Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out
Date
Msg-id 14692.1153449987@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2542: ALTER USER foo SET bar = func(baz) errors out  ("David Fetter" <david@fetter.org>)
Responses Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out  (David Fetter <david@fetter.org>)
List pgsql-bugs
"David Fetter" <david@fetter.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

pgsql-bugs by date:

Previous
From: "David Fetter"
Date:
Subject: BUG #2542: ALTER USER foo SET bar = func(baz) errors out
Next
From: David Fetter
Date:
Subject: Re: BUG #2542: ALTER USER foo SET bar = func(baz) errors out