Re: proposal: multiple psql option -c

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




Well, it's not *entirely* true that it has only backwards compatibility
to recommend it: without -c in its current form, there would be no way
to test multiple-commands-in-one-PQexec cases without hacking up some
custom test infrastructure.  That's not a very strong reason maybe, but
it's a reason.  And backwards compatibility is usually a strong argument
around here anyway.

I've not been following this thread in any detail, but have we considered
the approach of allowing multiple -c and saying that each -c is a separate
PQexec (or backslash command)?  So the semantics of one -c wouldn't change,
but commands submitted through multiple -c switches would behave
relatively unsurprisingly, and we wouldn't need two kinds of switch.

I believe it can work, but there are stronger limit of single PQexec call - only result of last command is displayed.

Regards

Pavel
 

Another issue here is how -1 ought to interact with multiple -c.

                        regards, tom lane

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Parallel Seq Scan
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: Bug in numeric multiplication