set/reset issues in create function and set_config - Mailing list pgsql-bugs

From Alexey Bashtanov
Subject set/reset issues in create function and set_config
Date
Msg-id a7c1f0cb-1031-abf8-e4cc-13cf781d6563@imap.cc
Whole thread Raw
Responses Re: set/reset issues in create function and set_config  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List 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), 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

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #15169: create index CONCURRENTLY conflict with other table's COPY
Next
From: PG Bug reporting form
Date:
Subject: BUG #15170: PQtransactionStatus returns ACTIVE after Empty Commit