Re: Fix for psql core dumping on bad user

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Fix for psql core dumping on bad user
Дата
Msg-id Pine.LNX.4.30.0104181833040.762-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Fix for psql core dumping on bad user  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane writes:

> $ cat zscript
> \connect - testuser
> $ psql -f zscript regression
> psql:zscript:1: \connect: FATAL 1:  user "testuser" does not exist
> $
>
> Nonetheless, the comment at the top of do_connect() says that it
> *should* terminate the program under these circumstances, so I'm not
> sure why it doesn't.  Peter?

The comment is not correct.  Failure in do_connect() in non-interactive
mode terminates the script.  In the case of -f the program terminates
implicitly, but in case of \i you would return to the prompt (or the
containing \i).

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


В списке pgsql-patches по дате отправления:

Предыдущее
От: "D. Hageman"
Дата:
Сообщение: Re: Fix for psql core dumping on bad user
Следующее
От: "D. Hageman"
Дата:
Сообщение: Re: Fix for psql core dumping on bad user