0

Is there any way in psql (Greenplum flavour) of exiting a script?

I have tried with \q and \quit, e.g.

\echo "Hello";
\q -- or \quit

but I get:

my_database> \i my_script.sql
psql:/home/josh/my_script.sql:2: invalid command \quit;

(and a similar result for \q)

  • \q works fine for \i input for me here, with real PostgreSQL 9.3. I'm guessing Greenplum's old version of the client doesn't support it. – Craig Ringer Feb 20 '14 at 17:33
  • What do you get for psql --version? – Erwin Brandstetter Feb 21 '14 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.