Re: pg_get__*_ddl consolidation

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-20T13:31:11Z
Lists: pgsql-hackers
On 2026-03-20 Fr 9:15 AM, Álvaro Herrera wrote:
> On 2026-Mar-19, Andrew Dunstan wrote:
>
>> Greetings
>>
>> Euler Taveira and I have been working on consolidating these patches.
> Hmm, did you remove the permissions checking to dump objects?  I thought
> we had concluded that these were needed -- ie. you have to have at least
> CONNECT to a database to be able to dump it, and so on.  This way, the
> functions do not override a DBAs intention to hide the information, when
> they run REVOKE on the catalogs.  I know this is a nonstandard thing to
> do, but some people do it nonetheless.
>
> https://postgr.es/m/202511131446.uzn4c25ljmd4@alvherre.pgsql
>

Oh, hmm, yes, I think we did. Will work on it.


cheers


andrew

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




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use named boolean parameters for pg_get_*_ddl option arguments

  2. Convert ddlutils regression tests to TAP tests.

  3. Fix pfree crash in pg_get_role_ddl() and pg_get_database_ddl().

  4. Fixups for a4f774cf1c7

  5. Add infrastructure for pg_get_*_ddl functions

  6. Add pg_get_database_ddl() function

  7. Add pg_get_role_ddl() function

  8. Add pg_get_tablespace_ddl() function