From b7e4e3e7fa73458ecca5cd10f341743fd12a4faa Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 29 Jun 2026 13:15:07 +0900 Subject: [PATCH] doc: Reorder table for Object DDL Functions While on it, let's add links pointing to the set of SQL commands generated by these functions. The descriptions of the functions are exactly the same, just moved around. Author: Peter Smith Reviewed-by: Ian Lawrence Barwick Discussion: https://postgr.es/m/CAHut+Pun9Z8qZFJTa9fLgdhM=Cip9d-cnx2YXDW6eFrSwbQj1g@mail.gmail.com --- doc/src/sgml/func/func-info.sgml | 81 +++++++++++++++++--------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/doc/src/sgml/func/func-info.sgml b/doc/src/sgml/func/func-info.sgml index bc80bcbd0b3..69ef3857cfa 100644 --- a/doc/src/sgml/func/func-info.sgml +++ b/doc/src/sgml/func/func-info.sgml @@ -3874,6 +3874,34 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres} + + + + pg_get_database_ddl + + pg_get_database_ddl + ( database regdatabase + , pretty boolean + DEFAULT false + , owner boolean + DEFAULT true + , tablespace boolean + DEFAULT true ) + setof text + + + Reconstructs the CREATE + DATABASE statement for the specified database, + followed by ALTER DATABASE + statements for connection limit, template status, + and configuration settings. Each statement is returned as a separate + row. When pretty is true, the output is + pretty-printed. When owner is false, the + OWNER clause is omitted. When + tablespace is false, the + TABLESPACE clause is omitted. + + @@ -3888,14 +3916,15 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres} setof text - Reconstructs the CREATE ROLE statement and any - ALTER ROLE ... SET statements for the given role. - Each statement is returned as a separate row. + Reconstructs the CREATE ROLE + statement and any + ALTER ROLE ... SET statements for the given + role. Each statement is returned as a separate row. Password information is never included in the output. When pretty is true, the output is pretty-printed. When memberships is false, - GRANT statements for role memberships are - omitted. + GRANT statements + for role memberships are omitted. @@ -3921,40 +3950,14 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres} setof text - Reconstructs the CREATE TABLESPACE statement for - the specified tablespace (by OID or name). If the tablespace has - options set, an ALTER TABLESPACE ... SET statement - is also returned. Each statement is returned as a separate row. - When pretty is true, the output is - pretty-printed. When owner is false, the - OWNER clause is omitted. - - - - - - pg_get_database_ddl - - pg_get_database_ddl - ( database regdatabase - , pretty boolean - DEFAULT false - , owner boolean - DEFAULT true - , tablespace boolean - DEFAULT true ) - setof text - - - Reconstructs the CREATE DATABASE statement for the - specified database, followed by ALTER DATABASE - statements for connection limit, template status, and configuration - settings. Each statement is returned as a separate row. - When pretty is true, the output is - pretty-printed. When owner is false, the - OWNER clause is omitted. When - tablespace is false, the - TABLESPACE clause is omitted. + Reconstructs the CREATE + TABLESPACE statement for the specified tablespace (by + OID or name). If the tablespace has options set, an + ALTER TABLESPACE ... SET + statement is also returned. Each statement is + returned as a separate row. When pretty is + true, the output is pretty-printed. When owner + is false, the OWNER clause is omitted.