| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, gonzalemario(at)gmail(dot)com, dbryan(dot)green(at)gmail(dot)com, euler(at)eulerto(dot)com, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pg_get_*_ddl() needs a redesign |
| Date: | 2026-09-11 15:58:31 |
| Message-ID: | 1242186.1789142311@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Sep 11, 2026 at 11:14 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Users
>> don't always have the luxury of being able to follow the advice to
>> "use the newest pg_dump to make your dump".
> I completely agree with this. But when they don't, things break pretty
> regularly. Just to take one example, adding a new parser keyword can
> require quoting to be added to older dumps, which obviously won't work
> if the list of identifiers needing quoting is taken from the target
> system's tables rather than pg_dump's own knowledge.
Maybe --quote-all-identifiers should be the default? I don't think
that we break old syntax "pretty regularly" in any other way.
But that's a side point.
> That's one of many reasons why I do not think this feature can share
> code with pg_dump in any meaningful way. We either decide that we're
> OK with having this feature for situations where people just want a
> quick SQL representation of an existing object without worrying about
> all the stuff pg_dump deals with, or we discard the feature. I don't
> think there's an intermediate world where this feature can serve the
> needs of pg_dump. I'd love to be wrong; if somebody has a great idea,
> cool. But I don't see it.
I'm not quite convinced. But if that's really the case, I'm voting
for "discard the feature". It's not useful enough to justify doubling
the maintenance load associated with DDL reconstruction.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-09-11 15:58:39 | Re: Reject WAIT FOR earlier in transaction-snapshot mode |
| Previous Message | Paul A Jungwirth | 2026-09-11 15:52:06 | Re: FOR PORTION OF code review |