Re: CTAS command tags

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CTAS command tags
Дата
Msg-id 1155317.1611330774@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CTAS command tags  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
Andreas Karlsson <andreas@proxel.se> writes:
> On 1/22/21 2:19 PM, Darafei "Komяpa" Praliaskouski wrote:
>> Having row count right away is very useful in CTAS in analytical and GIS 
>> usage scenarios.

> I can see that, but would it not work if it was:
> CREATE TABLE AS 1

Changing the set of command tags that have counts attached would amount
to a wire-protocol break, because clients such as libpq know which ones
do.  So to standardize this as Vik wants, we'd have to make the WITH
NO DATA case return "SELECT 0" (not 1, surely).  That seems a little
weird.

I have a vague recollection that this has been discussed before,
though I lack the energy to go digging in the archives right now.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Add primary keys to system catalogs
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: [PoC] Non-volatile WAL buffer