From: | Alexey Bashtanov <bashtanov(at)imap(dot)cc> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | set/reset issues in create function and set_config |
Date: | 2018-04-24 15:32:08 |
Message-ID: | a7c1f0cb-1031-abf8-e4cc-13cf781d6563@imap.cc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hello,
It looks like set_config does set-to-default if it's called with second
argument being null, but this is undocumented.
Please see the docs patch to fix it.
Also, SET to DEFAULT or RESET in CREATE FUNCTION is accepted but does
nothing.
It wouldn't be a problem, but documentation to SET command says:
> If SET LOCAL is used within a function that has a SET option for the
same variable (see CREATE FUNCTION
<https://www.postgresql.org/docs/9.4/static/sql-createfunction.html>),
the effects of the SET LOCAL command disappear at function exit
This doesn't work with CREATE FUNCTION ... SET ... DEFAULT ....
What do you think of just disallowing it? Patch attached as well.
Best regards,
Alexey
Attachment | Content-Type | Size |
---|---|---|
disallow-create-function-set-default.patch | text/x-patch | 2.4 KB |
document-set_config-2nd-null.patch | text/x-patch | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2018-04-24 16:49:17 | BUG #15170: PQtransactionStatus returns ACTIVE after Empty Commit |
Previous Message | David G. Johnston | 2018-04-24 15:29:52 | Re: BUG #15169: create index CONCURRENTLY conflict with other table's COPY |