pg_get_database_ddl ( database regdatabase [, pretty boolean DEFAULT false] [, owner boolean DEFAULT true] [, tablespace boolean DEFAULT true] ) → setof textReconstructs 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.