Hello devs,
I want to abort a psql script. How can I do that? The answer seems to be
\quit, but it is not so simple:
- when the current script is from a terminal, you exit psql, OK
- when the current script is from a file (-f, <), you exit psql, OK
- when the current script is included from something,
you quit the current script and proceed after the \i of next -f, BAD
Question: is there any way to really abort a psql script from an included
file?
I've found "\! kill $PPID" which works with bash, but I'm not sure of the
portability and I was hoping for something straightforward and cleaner.
If there is really no simple way, would it be okay to add a \exit which
does that?
--
Fabien.