Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Andrei Klychkov <andrew.a.klychkov@gmail.com>,
Jim Jones <jim.jones@uni-muenster.de>,
pgsql-hackers@lists.postgresql.org
Date: 2025-09-04T21:52:49Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow "SET list_guc TO NULL" to specify setting the GUC to empty.
- ff4597acd4c3 19 (unreleased) landed
Attachments
- v3-allow-SET-to-an-empty-list.patch (text/x-diff) patch v3
I wrote: > Another idea is that we could redefine a single '' as meaning an empty > list if we were to forbid empty strings as members of GUC_LIST_QUOTE > variables. I tried to work through what this'd imply, and arrived at the attached patch. I might've missed some places, and I did not think about what documentation updates would be appropriate. Note that the patch includes changing SplitIdentifierString and its clones to forbid zero-length quoted elements, which were formerly allowed. Without this, we'd accept values from config files that could not be represented in SET, which is exactly the situation we are trying to fix. I'm not entirely sure if this is the way to go, or if we want to adopt some other solution that doesn't involve forbidding empty list elements. I suspect that anything else we come up with would be less intuitive than letting SET list_var = '' do the job; but maybe I just lack imagination today. regards, tom lane