pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedPSQL Help
4+ messages / 4 participants
[nested] [flat]
* PSQL Help
@ 2020-02-17 20:38 Andre Lucas <andre@amazoniasistemas.com.br>
2020-02-18 03:06 ` Re: PSQL Help David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Andre Lucas @ 2020-02-17 20:38 UTC (permalink / raw)
To: pgsql-bugs
I am having the following problem when trying to restore a backup of a following file.
the version of postGre on my machine is 9.3
However, the backup was made in version 9.2.15
I get the following message when I try to run psql:
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
psql (9.3.21)”
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PSQL Help
2020-02-17 20:38 PSQL Help Andre Lucas <andre@amazoniasistemas.com.br>
@ 2020-02-18 03:06 ` David G. Johnston <david.g.johnston@gmail.com>
2020-02-18 03:39 ` Re: PSQL Help Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: David G. Johnston @ 2020-02-18 03:06 UTC (permalink / raw)
To: Andre Lucas <andre@amazoniasistemas.com.br>; +Cc: pgsql-bugs
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”
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PSQL Help
2020-02-17 20:38 PSQL Help Andre Lucas <andre@amazoniasistemas.com.br>
2020-02-18 03:06 ` Re: PSQL Help David G. Johnston <david.g.johnston@gmail.com>
@ 2020-02-18 03:39 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-18 04:37 ` Re: PSQL Help Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2020-02-18 03:39 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Andre Lucas <andre@amazoniasistemas.com.br>; 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PSQL Help
2020-02-17 20:38 PSQL Help Andre Lucas <andre@amazoniasistemas.com.br>
2020-02-18 03:06 ` Re: PSQL Help David G. Johnston <david.g.johnston@gmail.com>
2020-02-18 03:39 ` Re: PSQL Help Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-18 04:37 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Paquier @ 2020-02-18 04:37 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; Andre Lucas <andre@amazoniasistemas.com.br>; pgsql-bugs
On Mon, Feb 17, 2020 at 10:39:16PM -0500, Tom Lane wrote:
> 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.
This is actually the case of our fallback implementation used for
example on Windows with MSVC builds. This led to fixes in our
regression tests like c67a86f, so we avoid this style as much as
possible on portability's ground.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-02-18 04:37 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 20:38 PSQL Help Andre Lucas <andre@amazoniasistemas.com.br>
2020-02-18 03:06 ` David G. Johnston <david.g.johnston@gmail.com>
2020-02-18 03:39 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-18 04:37 ` Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox