public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Mahendra Singh Thalor <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_get__*_ddl consolidation
Date: Thu, 19 Mar 2026 17:30:06 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKYtNApR4ftEPg3cruqiNx25W5pBhupep6Fn+3xPZ=TZGqZh8w@mail.gmail.com>
References: <[email protected]>
	<CAKYtNArapMAz-EfLwYPhX7diSg4gXA5OgsULM_ZYGGgtrgztVw@mail.gmail.com>
	<[email protected]>
	<CAKYtNApR4ftEPg3cruqiNx25W5pBhupep6Fn+3xPZ=TZGqZh8w@mail.gmail.com>


On 2026-03-19 Th 4:28 PM, Mahendra Singh Thalor wrote:
> On Fri, 20 Mar 2026 at 01:44, Andrew Dunstan <[email protected]> wrote:
>>
>> You could construct these functions using plpgsql. The information isn't hidden from non-superusers. So what exactly would making these functions superuser-only achieve? Now it's true that the user might not be able to execute the DDL. But that's not the point.
> Thanks Andrew for the clarification.
>
> Sorry, my question might be stupid. Can we use these functions
> directly into our dump utilities so that common code can be removed
> and if there is any syntax change for a particular object, then no
> need to change into different-2 places, rather we just need to change
> it into ddlutils.c file only.


Well, we have tried to make the output like pg_dump. We might later 
provide options for more compact output. But it remains to be seen if it 
can be used in the pg_dump utilities. After all, it is going to produce 
output suitable for the source version, since there is no knowledge in 
the server of future versions. But pg_dump emits SQL suitable for the 
target version.

My original motivation was quite different. It was to give the user a 
piece of SQL that they could modify as they saw fit, rather than making 
them start with a blank canvas.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com






view thread (31+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: pg_get__*_ddl consolidation
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox