Re: pg_get_*_ddl() needs a redesign

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, gonzalemario(at)gmail(dot)com, dbryan(dot)green(at)gmail(dot)com, euler(at)eulerto(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_get_*_ddl() needs a redesign
Date: 2026-09-13 18:28:12
Message-ID: 88e205f5-f561-4a00-b6e6-ab070ea6400a@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-09-10 Th 7:59 PM, Andrew Dunstan wrote:
>
> On 2026-09-09 We 6:25 PM, Andrew Dunstan wrote:
>>
>>
>> Thanks for reviewing. I hope to have some proposals tomorrow for
>> addressing these issues as well as those raised by Noah.
>>
>>
>>
>
> I have run out of time, energy and brain cells. I have some working
> patches, but a) they need a little polish and b) I think they are too
> invasive for consideration now. The major difference in actual code
> (as opposed to testing) is in how we deal with permissions. I spent
> quite a lot of time yesterday and today on that, and came to the
> conclusion that it needs to be reworked along these lines: we should
> allow the user to see the information the functions provide if and
> only if they can see it by directly selecting from the catalog. Code
> changes to implement this by directly running ACL checks on  the
> relevant catalogs are straightforward but also substantial. My
> proposed changes to testing are also substantial, being both more
> efficient and providing better coverage, especially w.r.t pg_dump/all
> compatibility.
>
> I therefore suggest that we revert for release 19, but not in master,
> and I will continue to polish the patches I mentioned and publish them
> in a few days.
>
> I can make the revert happen in the next day or so.
>
>
>

OK, I have done that revert. Here are the patches Euler and I have in mind.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
v6-0001-pg_get_role_ddl-password-support-membership-grant.patch text/x-patch 9.7 KB
v6-0002-pg_get_tablespace_ddl-pg_get_database_ddl-output-.patch text/x-patch 5.1 KB
v6-0003-pg_get_role_ddl-pg_get_tablespace_ddl-pg_get_data.patch text/x-patch 7.6 KB
v6-0004-ddlutils-refactor-for-maintainability.patch text/x-patch 18.0 KB
v6-0005-pg_get_database_ddl-pg_get_role_ddl-require-catal.patch text/x-patch 83.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2026-09-13 18:37:49 Re: REPACK (CONCURRENTLY) backend waits indefinitely when decoding worker fails to start
Previous Message Alexander Nestorov 2026-09-13 17:43:16 Re: [PATCH] btree_gist: add cross-type integer operator support for GiST