Function `set_config` doesn't work in with query?

From: Zexuan Luo <spacewanderlzx(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Function `set_config` doesn't work in with query?
Date: 2019-01-04 09:36:55
Message-ID: CAADJU12T-Zxuah=3+821YjyL5M9_r-Cmvyjp2VWSjGVrWisjEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

For instance:
```
with t as (
select set_config('blah', '1', false)
)
select current_setting('blah');
select current_setting('blah');
```

Execute queries above gets these error messages:
psql:test-query-dump.sql:4: ERROR: unrecognized configuration parameter "blah"
psql:test-query-dump.sql:5: ERROR: unrecognized configuration parameter "blah"

Thank you for any responses.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rene Romero Benavides 2019-01-04 10:18:18 Re: Function `set_config` doesn't work in with query?
Previous Message Jack LIU 2019-01-04 07:14:42 SPI Interface to Call Procedure with Transaction Control Statements