Re: pg_get__*_ddl consolidation - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: pg_get__*_ddl consolidation
Date
Msg-id 8ec9b67d-939e-4b22-8d56-a5129f92d32d@app.fastmail.com
Whole thread Raw
In response to Re: pg_get__*_ddl consolidation  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_get__*_ddl consolidation
List pgsql-hackers

On Fri, Mar 20, 2026, at 10:31 AM, Andrew Dunstan wrote:
>
> Oh, hmm, yes, I think we did. Will work on it.
>

Here is a new patchset (v2) including all suggested changes in this thread. It
fixes:

* DDLOptType: comma in the last element;
* union for boolval, textval, intval;
* va_list in a restricted scope;
* foreach_ptr + boolean in patches 0002 and 0004;
* list_nth instead of list_nth_cell in patches 0002 and 0004;
* OWNER = role typo. Add test;
* use pstrdup for dbname;
* output only database-specific GUCs;
* add ACL_CONNECT check as the original patch. I removed the pg_read_all_stats
case because it doesn't match the role description;

However, I didn't include the suggestion to explain that pg_get_role_ddl is
dependent on the DateStyle. I think it fits better in the CREATE ROLE [1] that
does not mention it in the VALID UNTIL clause. I'm not opposed to the idea of
adding a sentence to the function description but my suggestion is that this
new sentence points to CREATE ROLE page.


[1] https://www.postgresql.org/docs/current/sql-createrole.html


-- 
Euler Taveira
EDB   https://www.enterprisedb.com/
Attachment

pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
Next
From: Jianghua Yang
Date:
Subject: [PATCH] Fix wrong argument to SOFT_ERROR_OCCURRED in timestamptz_date