Re: proposal: multiple psql option -c

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: multiple psql option -c
Дата
Msg-id CAFj8pRCisq---N07ZL_Na1o2bCESmW2mwoOwHWB4PNkqOtLk-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: multiple psql option -c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: proposal: multiple psql option -c
Список pgsql-hackers

1. -c no longer implies --no-psqlrc.  That's a backwards incompatibility,
but very easy to explain and very easy to work around.


This can be very surprising change. Can we disable it temporary by some environment variable? like NOPSQLRC ?

 
2. You can have multiple -c and/or -f.  Each -c is processed in
the traditional way, ie, either it's a single backslash command
or it's sent in a single PQexec.  That doesn't seem to me to have
much impact on the behavior of adjacent -c or -f.

3. If you combine -1 with -c and/or -f, you get one BEGIN inserted
at the beginning and one COMMIT at the end.  Nothing else changes.

As long as you put only one SQL command per -c, I don't think that
this definition has any real surprises.  And we can discourage
people from putting more than one, saying that that will invoke
legacy behaviors you probably don't want.

+1

Pavel
 

                        regards, tom lane

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] SQL function to report log message
Следующее
От: Tomasz Rybak
Дата:
Сообщение: Re: pglogical_output - a general purpose logical decoding output plugin