[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Script checking to see what database it's connected to
From:       Thomas Kellerer <shammat () gmx ! net>
Date:       2021-02-22 6:36:37
Message-ID: f25283f9-5955-2070-17ad-7ac534d6e18b () gmx ! net
[Download RAW message or body]

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/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic