Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: Shubham Khanna <khannashubham1197(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Subject: Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Date: 2025-03-26 04:31:40
Message-ID: CALDaNm3maAWmLP2+7s+WvnR=ThzwcXP-q8Ni6j8y_HAQt=9B5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 26 Mar 2025 at 02:05, Euler Taveira <euler(at)eulerto(dot)com> wrote:
>
> On Tue, Mar 25, 2025, at 8:07 AM, Shubham Khanna wrote:
>
> The following code is not accurate. If I specify --all, --database and
> --subscription, it will report only --database. The user will remove it and run
> again. At this time, --subscription will be report. My expectation is to have
> all reports at once.

I felt pg_dump reports conflicts incrementally rather than listing all
incompatible options at once as shown below:
### Specified, --data-only, --schema-only, --statistics-only,
--no-data and --clean options. together
Example1: ./pg_dump --data-only --schema-only --statistics-only
--no-data --clean -d postgres -f dump.txt
pg_dump: error: options -s/--schema-only and -a/--data-only cannot be
used together

### After removing --schema-only option, another error arises
Example2: ./pg_dump --data-only --statistics-only --no-data --clean
-d postgres -f dump.txt
pg_dump: error: options -a/--data-only and --statistics-only cannot be
used together

### After removing --no-data option, another error arises
Example3: ./pg_dump --data-only --no-data --clean -d postgres -f dump.txt
pg_dump: error: options -a/--data-only and --no-data cannot be used together

### After removing --clean option, another error arises
Example4: ./pg_dump --data-only --clean -d postgres -f dump.txt
pg_dump: error: options -c/--clean and -a/--data-only cannot be used together

I believe the current patch follows this approach and also simplifies
the code handling, making it easier to maintain.

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-03-26 04:32:49 Re: UUID v7
Previous Message Amul Sul 2025-03-26 04:02:33 Re: NOT ENFORCED constraint feature