Re: PSQL Help - Mailing list pgsql-bugs

From Tom Lane
Subject Re: PSQL Help
Date
Msg-id 32736.1581997156@sss.pgh.pa.us
Whole thread Raw
In response to Re: PSQL Help  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: PSQL Help
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Monday, February 17, 2020, Andre Lucas <andre@amazoniasistemas.com.br>
> wrote:
>> psql -h localhost -U postgres NovoBD -f Backup17.sql
>> “psql: warning: extra command-line argument "-f" ignored
>> psql: warning: extra command-line argument "Backup17.sql" ignored

> You command doesn’t match the documented syntax:
>  psql [option...] [dbname [username]]
> Hint: NovoBD is the “dbname”

FWIW, Andres' example *will* work on some platforms, because glibc's
getopt_long() takes it upon itself to rearrange the arguments.
But it doesn't work everywhere, which is why we only document/recommend
the stricter argument order.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: PSQL Help
Next
From: Hazuki Amamiya
Date:
Subject: Re: Possible memory leak in PostgreSQL 12.2 on truncate, insert ordelete when type interval is involved