[PATCH] Unify duplicate-option handling across utility commands - Mailing list pgsql-hackers

From Baji Shaik
Subject [PATCH] Unify duplicate-option handling across utility commands
Date
Msg-id CA+fm-ROpMi4+kYbepdWS2vr6ftVM-Db=Uhf6GrNuG3pNQ0-kGQ@mail.gmail.com
Whole thread
Responses Re: [PATCH] Unify duplicate-option handling across utility commands
List pgsql-hackers
Hi,

I worked on unifying how the utility commands (VACUUM, ANALYZE, EXPLAIN,
CHECKPOINT, REPACK) handle duplicate options. It came up in one of my
patches here [1].

Based on that, I'm leaning towards last-wins rather than erroring on
duplicate options. It matches what REPACK/VACUUM/EXPLAIN already do, and
REPACK was recently fixed in-tree to be last-wins. But let me know your feedback, 
since COPY and WAIT FOR follow the error mechanism:

1/ is it better to have the error everywhere instead? Or
2/ go with the attached rough draft of the patch, which adds a centralized helper that 
collapses duplicates to last-wins and has each command called once?

[1] https://www.postgresql.org/message-id/CAA-aLv57ymRoDJ%2B2UnHCE7WDB_FH5pW9%2BbFX7z5wEegudPrdRQ%40mail.gmail.com

Regards,
Baji Shaik
Attachment

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Adding init-po and update-po targets to the meson build system
Next
From: Peter Eisentraut
Date:
Subject: Re: fix more casting away of qualifiers