Search Postgresql Archives

Re: Script checking to see what database it's connected to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Julien Rouhaud schrieb am 22.02.2021 um 02:19:
>> The output:
>> $ psql12 -f test_pg.sql
>> t
>> connected to postgres
>> got here
>> psql:test_pg.sql:15: ERROR:  syntax error at or near "exit"
>> LINE 1: exit
>
> Well, the supported commands did work.  You should probably look at
> https://www.postgresql.org/docs/current/app-psql.html, you'd see that
> "exit" is not a supported command and you should instead use \q[uit].
> I recommend looking at the semantics of \quit though, given your next
> message mentioning \include.

Since v11 "exit" and "quit" are allowed if no previous input was given on the line.

It's only documented in the release notes[1] though, not in the manual.

Thomas

[1] https://www.postgresql.org/docs/release/11.0/






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux