public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zsolt Parragi <[email protected]>
To: Euler Taveira <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Álvaro Herrera <[email protected]>
Cc: Japin Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_get__*_ddl consolidation
Date: Tue, 24 Mar 2026 21:56:56 +0000
Message-ID: <CAN4CZFNYM5jNA_gLu9miAXg_7c8Z2zf-ePc+0rzidAV3CBs=cw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
v2 is definitely better, I can confirm the improvements.
> including all suggested changes in this thread
But I want to point out that the permission check question, and the
role membership question is still open.
For the membership question
> I'm not opposed
> to your idea but IMO it should be an option.
I'm also fine with leaving it out, but then it should be a mentioned limitation.
For v2:
Shouldn't the tablespace function also support an owner option
similarly to the database function?
A pfree(nulls) and pfree(spcname) seem to be missing, all other
variables are freed properly.
+
+ /*
+ * Variables that are marked GUC_LIST_QUOTE were already fully
+ * quoted before they were put into the setconfig array. Break
+ * the list value apart and then quote the elements as string
+ * literals.
+ */
+ if (GetConfigOptionFlags(s, true) & GUC_LIST_QUOTE)
+ {
This part seems to be duplicated between the two functions, maybe
could be a helper?
+ALTER ROLE regress_role_ddl_test4 SET search_path TO 'myschema, public';
Maybe it would be useful to also test the "SET search_path TO
myschema, public" variant, without quotes?
I also want to go back to the datestyle question one more time:
> The non-fixed DateStyle is by design. It mimics pg_dumpall.
Isn't pg_dump and pg_dumpall inconsistent in this? pg_dump sets it to
ISO, pg_dumpall uses DateStyle. So I'm not that sure about the
"pg_dumpall works this way" argument because pg_dump works
differently. Maybe either of those tools should also be fixed?
The pg_dump behavior is actually a bugfix in cf4cee1b, which was never
applied to pg_dumpall, so it seems like an oversight to me?
> At present, dates are put into a dump in the format specified by the
> default datestyle. This is not portable between installations.
>
> This patch sets DATESTYLE to ISO at the start of a pg_dump, so that the
> dates written into the dump will be restorable onto any database,
> regardless of how its default datestyle is set.
view thread (31+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pg_get__*_ddl consolidation
In-Reply-To: <CAN4CZFNYM5jNA_gLu9miAXg_7c8Z2zf-ePc+0rzidAV3CBs=cw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox