Re: Why forbid "INSERT INTO t () VALUES ();"

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Why forbid "INSERT INTO t () VALUES ();"
Дата
Msg-id CAApHDvquT6uG-84nui=ixax-HdW0qfZ5vwa71kD6KTXDOpXK1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why forbid "INSERT INTO t () VALUES ();"  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Thu, 25 Jun 2020 at 16:56, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> It also means that if for some reason someone wants to insert several such
> all-default rows, they have to repeat the insert, as "VALUES (), ();"
> would not work, so it is also losing a corner-corner case capability
> without obvious reason.

This is not a vote in either direction but just wanted to say that
during 7e413a0f8 where multi-row inserts were added to pg_dump, a
special case had to be added to support tables with no columns.  We
cannot do multi-inserts for that so are forced to fall back on
one-row-per-INSERT.

However, even if we had this syntax I imagine it would be unlikely
we'd change pg_dump to use it since we want to be as standard
compliant as possible when dumping INSERTs since it appears the only
genuine use-case for that is for importing the data into some other
relational database.

David



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Open Item: Should non-text EXPLAIN always show properties?
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Online checksums patch - once again