From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Euler Taveira" <euler(at)eulerto(dot)com> |
Cc: | "Nohez Poonawala" <nohezp(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Suggestion to standardize comment format in pg_dump |
Date: | 2024-12-11 15:38:03 |
Message-ID: | 481582.1733931483@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Euler Taveira" <euler(at)eulerto(dot)com> writes:
> On Wed, Dec 11, 2024, at 3:37 AM, Nohez Poonawala wrote:
>> To maintain consistency, I suggest modifying the comment format for
>> indexes to include the associated TABLENAME, similar to constraints.
>> For example:
>> - for Index:
>> -- Name: TABLENAME INDEXNAME; Type: INDEX; Schema: SCHEMA; Owner: OWNER
> ... An argument against this inclusion is that it will
> increase the output file size without adding a crucial information. You mention
> consistency but since it is a different class of objects I don't think this
> argument holds much water.
I think a bigger problem is compatibility. It seems likely that there
are tools out there that would be broken by such a change. These
comments aren't just comments: they directly reflect what is in the
"tag" fields of the per-object entries in the custom dump format.
So for example this would also affect the output of "pg_restore -l".
Even if you doubt that anything is scanning actual dump files looking
for these comments, it seems certain that people have built tools
and scripts that examine -l output. There might well be places in
pg_restore itself that depend on the tag being just the index name
and no more, too.
I'll concede that this proposal would have been a good idea if it'd
been done that way early on. But I don't think it's such a good idea
as to be worth breaking things for.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Borisov | 2024-12-11 16:04:40 | Re: Proposal to add a new URL data type. |
Previous Message | Euler Taveira | 2024-12-11 15:14:01 | Re: Suggestion to standardize comment format in pg_dump |