| From: | Thomas Kellerer <shammat(at)gmx(dot)net> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Script checking to see what database it's connected to |
| Date: | 2021-02-22 06:36:37 |
| Message-ID: | f25283f9-5955-2070-17ad-7ac534d6e18b@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Yambu | 2021-02-22 06:36:41 | converting text to bytea |
| Previous Message | Atul Kumar | 2021-02-22 06:17:48 | Streaming replication between different OS |