Re: How to *really* quit psql?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: How to *really* quit psql?
Дата
Msg-id CAM-w4HNKg_dSjTrNurYsmUsPywboh4vjEwLipjSqnnr-BmVVow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to *really* quit psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How to *really* quit psql?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 19 Nov 2022 at 14:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Under what circumstances would it be appropriate for a script to take
> it on itself to decide that?  It has no way of knowing what the next -f
> option is or what the user intended.

Presumably when they're written by the same person so the script does
effectively know what the "user" intended because it's written by the
same user.

Off the top of my head I could imagine someone writing something like
report-error-and-exit.sql and wanting to be able to use \i
report-error-and-exit.sql to ensure all scripts report their errors
using some common log file or something.

Not saying that's the only or best way to do that though. And there is
the risk that scripts would start using this functionality
inappropriately which would mean, for example, getting an install
script for something and then not being able to use it within another
script safely :(

--
greg



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

Предыдущее
От: Марина Полякова
Дата:
Сообщение: Re: Fix order of checking ICU options in initdb and create database
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Simplify vacuum_set_xid_limits()'s signature (minor refactoring)