Re: Postgres and --config-file option

2024-05-20 Thread Michael Paquier
On Mon, May 20, 2024 at 12:20:02PM +0300, Aleksander Alekseev wrote: > Robert Haas writes: >> I agree that it's not necessary or particularly useful for this hint >> to be exhaustive. I could get behind your suggestion of >> s/You must specify/Specify/, but I also think it's fine to do nothing.

Re: Postgres and --config-file option

2024-05-20 Thread Aleksander Alekseev
Hi, > Robert Haas writes: > > If the reason that somebody is upset is because it's not technically > > true to say that you *must* do one of those things, we could fix that > > with "You must" -> "You can" or with "You must specify" -> "Specify". > > The patch you propose is also not terrible or

Re: Postgres and --config-file option

2024-05-17 Thread Tom Lane
Robert Haas writes: > If the reason that somebody is upset is because it's not technically > true to say that you *must* do one of those things, we could fix that > with "You must" -> "You can" or with "You must specify" -> "Specify". > The patch you propose is also not terrible or anything, but

Re: Postgres and --config-file option

2024-05-17 Thread Robert Haas
On Thu, May 16, 2024 at 4:57 AM Aleksander Alekseev wrote: > I propose my original v1 patch for correcting the --help output of > 'postgres' too. I agree with the above comments that corresponding > changes in v4 became somewhat unwieldy. So, who is it exactly that will be confused by the status

Re: Postgres and --config-file option

2024-05-17 Thread Alvaro Herrera
On 2024-May-17, Michael Paquier wrote: > On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote: > > I propose my original v1 patch for correcting the --help output of > > 'postgres' too. I agree with the above comments that corresponding > > changes in v4 became somewhat unwieldy. >

Re: Postgres and --config-file option

2024-05-16 Thread David G. Johnston
On Thu, May 16, 2024 at 4:11 PM Michael Paquier wrote: > On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote: > > I propose my original v1 patch for correcting the --help output of > > 'postgres' too. I agree with the above comments that corresponding > > changes in v4 became

Re: Postgres and --config-file option

2024-05-16 Thread Michael Paquier
On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote: > I propose my original v1 patch for correcting the --help output of > 'postgres' too. I agree with the above comments that corresponding > changes in v4 became somewhat unwieldy. Thanks for compiling the rest. -printf(_("

Re: Postgres and --config-file option

2024-05-16 Thread Aleksander Alekseev
Hi, > Agreed that mentioning the --name variant is useful. I'm not really > on board with having one option refer to the other on the pages where > both are described, like on --help or the doc page for "postgres". > > For now, I've applied a patch for the libpq.sgml and config.sgml bits > which

Re: Postgres and --config-file option

2024-05-15 Thread Michael Paquier
On Wed, May 15, 2024 at 04:47:27PM +0200, Jelte Fennema-Nio wrote: > I definitely think it would be useful to list this --config variant in > more places, imho it's nicer than the -c variant. Especially in the > PGOPTIONS docs it would be useful. People are already using it in the > wild and I

Re: Postgres and --config-file option

2024-05-15 Thread Jelte Fennema-Nio
On Wed, 15 May 2024 at 11:49, Peter Eisentraut wrote: > Yeah, some of this is becoming quite unwieldy, if we document and > mention each spelling variant of each option everywhere. > > Maybe if the original problem is that the option --config-file is not > explicitly in the --help output, let's

Re: Postgres and --config-file option

2024-05-15 Thread David G. Johnston
On Wed, May 15, 2024 at 2:49 AM Peter Eisentraut wrote: > On 15.05.24 04:07, Michael Paquier wrote: > > Not sure that these additions in --help or the docs are necessary. > > The rest looks OK. > > > > -"You must specify the --config-file or -D invocation " > > +"You must specify the

Re: Postgres and --config-file option

2024-05-15 Thread Peter Eisentraut
On 15.05.24 04:07, Michael Paquier wrote: Not sure that these additions in --help or the docs are necessary. The rest looks OK. -"You must specify the --config-file or -D invocation " +"You must specify the --config-file (or equivalent -c) or -D invocation " How about "You must specify

Re: Postgres and --config-file option

2024-05-14 Thread Michael Paquier
On Tue, May 14, 2024 at 03:03:58PM +0300, Aleksander Alekseev wrote: > Here is the patch v4 with fixed typo ("geoq"). Per off-list feedback > from Alvaro - thanks! + -c name=value command-line parameter, or its equivalent + --name=value variation. For example, -postgres -c

Re: Postgres and --config-file option

2024-05-14 Thread Aleksander Alekseev
Hi, > Thanks for all your great input. Here is the updated patch. Here is the patch v4 with fixed typo ("geoq"). Per off-list feedback from Alvaro - thanks! -- Best regards, Aleksander Alekseev v4-0001-Clarify-error-message-about-specifying-config-fil.patch Description: Binary data

Re: Postgres and --config-file option

2024-05-14 Thread Aleksander Alekseev
David, Peter, > > The actual parameter is "config_file", so apparently we are supposed to > > either convert underscores to hyphens or we have a typo. > > We convert '-' to '_' when parsing long options (see ParseLongOption() > in guc.c). So writing the long options with hyphens should generally

Re: Postgres and --config-file option

2024-02-07 Thread Peter Eisentraut
On 02.02.24 22:27, David G. Johnston wrote: On Fri, Feb 2, 2024 at 2:23 PM David G. Johnston mailto:david.g.johns...@gmail.com>> wrote: On Mon, Jan 15, 2024 at 4:35 AM Aleksander Alekseev mailto:aleksan...@timescale.com>> wrote: PFA the patch. It's short but I think it

Re: Postgres and --config-file option

2024-02-02 Thread David G. Johnston
On Fri, Feb 2, 2024 at 2:23 PM David G. Johnston wrote: > On Mon, Jan 15, 2024 at 4:35 AM Aleksander Alekseev < > aleksan...@timescale.com> wrote: > >> PFA the patch. It's short but I think it mitigates the problem. >> >> > I took a look at where these options are discussed in the documentation

Re: Postgres and --config-file option

2024-02-02 Thread David G. Johnston
On Mon, Jan 15, 2024 at 4:35 AM Aleksander Alekseev < aleksan...@timescale.com> wrote: > PFA the patch. It's short but I think it mitigates the problem. > > I took a look at where these options are discussed in the documentation and now feel that we should make these options clear more broadly

Re: Postgres and --config-file option

2024-01-15 Thread Aleksander Alekseev
Hi, > It might be worthwhile to update the documentation if it would've helped > prevent confusion here. > Its documentation also describes this method of specifying parameters in > the 'Examples' section. I believe the documentation for 'postgres' already does a decent job in describing what

Postgres and --config-file option

2024-01-13 Thread David G. Johnston
On Saturday, January 13, 2024, Nathan Bossart wrote: > On Sat, Jan 13, 2024 at 01:39:50PM +0300, Aleksander Alekseev wrote: > > > Should we remove --config-file from the error message to avoid any > > confusion? Should we correct --help output? Should we update the > > documentation? > > It

Re: Postgres and --config-file option

2024-01-13 Thread Nathan Bossart
On Sat, Jan 13, 2024 at 01:39:50PM +0300, Aleksander Alekseev wrote: > OK, let's check section "20.1.4. Parameter Interaction via the Shell" > [1] of the documentation. Currently it doesn't tell anything about the > ability to specify GUCs --like-this, unless I missed something. It appears to be

Postgres and --config-file option

2024-01-13 Thread Aleksander Alekseev
Hi, A friend of mine complained about strange behavior of `postgres`. When executed without any arguments the following error is shown: ``` $ postgres postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA