Re: pg_get__*_ddl consolidation

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-20T13:15:16Z
Lists: pgsql-hackers
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

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Computing is too important to be left to men." (Karen Spärck Jones)



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