From: | Srinath Reddy <srinath2133(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump? |
Date: | 2025-01-25 12:42:44 |
Message-ID: | CAFC+b6roWqZqiBCeszgNX6U-uxS7eHKQ4A01Exsn8EUZ3JES3A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 24, 2025 at 8:54 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > I don't think we need a new file for this. pg_backup_utils.c is already
> > there for routines common to pg_restore and pg_dump.
>
> I'm not even on board with having a new function, because I doubt
> we should try to share this code in the first place. Who's to
> say that pg_dump and pg_restore must support exactly the same list
> of formats? For example, in the future we might decide that some
> format is obsolete and desupport it in pg_dump, while continuing
> to allow it for awhile in pg_restore for compatibility reasons.
> A closer-to-home possibility is that the work to allow non-text
> output from pg_dumpall will result in a format that pg_restore
> can read but pg_dump (by itself) doesn't write.
>
> So I'd just scrap pg_restore's parsing logic for this and replace it
> in-place. To the extent that that's copying and pasting stuff, fine.
> It's not like there's no other duplicativeness in their switch-parsing
> logic.
>
> regards, tom lane
>
Agreed and made the patch as suggested .
Regards,
Srinath Reddy Sadipiralla,
EDB:http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0001-Parse-the-format-option-for-pg_restore-with-pg_strcasecmp.patch | application/octet-stream | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Srinath Reddy | 2025-01-25 13:12:06 | Re: why -Fdance archive format option works with ./pg_restore but not with ./pg_dump? |
Previous Message | Jim Jones | 2025-01-25 11:45:34 | Re: XMLDocument (SQL/XML X030) |