How to *really* quit psql?
| От | Fabien COELHO |
|---|---|
| Тема | How to *really* quit psql? |
| Дата | |
| Msg-id | a7acfaf-331d-965e-3b44-7c51b22c3727@minesparis.psl.eu обсуждение исходный текст |
| Ответы |
Re: How to *really* quit psql?
|
| Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: