Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Amul Sul <sulamul(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Quan Zongliang <quanzongliang(at)yeah(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement
Date: 2026-03-05 14:55:27
Message-ID: 202603051452.d7hp2zb5e676@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Mar-05, Rafia Sabih wrote:

> Also, the option strategy is missing in the output, is it deliberate?
> If yes, why?

Yeah, the copying strategy is not integral part of the resulting
database: we don't store anywhere, how exactly the database was copied.
So it cannot be reproduced, and therefore it would be pointless to try
to emit something; or at least I cannot imagine a principled reason to
choose any one particular strategy here.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Por suerte hoy explotó el califont porque si no me habría muerto
de aburrido" (Papelucho)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-03-05 14:55:55 Re: [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch
Previous Message Evgeny Kuzin 2026-03-05 14:49:18 [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch