Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement - Mailing list pgsql-hackers

From Mark Wong
Subject Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement
Date
Msg-id aX1MiWtawMipiau6@o
Whole thread Raw
In response to Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
List pgsql-hackers
On Wed, Jan 21, 2026 at 03:01:44PM +0530, Akshay Joshi wrote:
> In my previous email, I included two different patches (for two separate
> approaches) from different branches. As a result, CommitFest is indicating
> that a rebase is required.
> 
> Apologies for the inconvenience, I’m still getting familiar with the
> process.
> 
> Attached are the patches, layered one on top of the other, representing two
> approaches:
> 
>    - *Double Dash*:
>    v8-0001-Add-pg_get_database_ddl-function-to-reconstruct-double-dash.patch
>    - *DefElem (Key-Value)*:
>    v8-0002-Add-pg_get_database_ddl-function-to-reconstruct-DefElem.patch
> 
> I am now submitting the *v8 patches*, which are ready for review. Please
> let me know which approach you find more suitable and preferable.

I have some documentation style suggestions that I've also attached as a patch:

* Update the pg_get_database_ddl() definitions in the func-info table to list
  the multiple database way to reference a database, similar to
  pg_database_size()
* Shorten the argument description for OID and name, again similar to
  pg_database_size()'s style
* Shorten ddl_options argument description to simply options, to match the
  style of how other functions in the docs describe optional parameters
* Remove the redundant explanation of the optional parameters in the individual
  function's description, and instead refer the reader to the explanation
  following the table
* Some word choice and phrasing changes in the pg_get_database_ddl function
  description to be grammatically closer to something like
  pg_restore_relation_stats()


I hope that is helpful...

Regards,
Mark
-- 
Mark Wong <markwkm@gmail.com>
EDB https://enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: index prefetching
Next
From: "David G. Johnston"
Date:
Subject: Re: Document NULL