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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Why forbid "INSERT INTO t () VALUES ();"
Дата
Msg-id CAKFQuwbsj=F4Td3wYGpBcYmhjEr6-FJNnAHf8deQE6RRKdgqAg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why forbid "INSERT INTO t () VALUES ();"  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Список pgsql-hackers
On Wed, Jun 24, 2020 at 3:31 PM Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote:
FWIW, MySQL (and MariaDB) only support INSERT INTO t () VALUES (), not
DEFAULT VALUES.

We have added syntax for MySQL compatibility in the
past, e.g. the CONCAT() function.

I don't see the similarities.  IIUC there isn't a standard mandated function that provides the behavior that the concat function does.  There is an operator but the treatment of NULL is different.  So for concat we decided to add a custom function modelled on another DB's custom function.  Adding custom syntax here when an identically behaving standard syntax already exists has considerably less going for it.  I would say that accepting the compatibility hit while being the ones that are standard-compliant is in line with project values.

David J.

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

Предыдущее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: Why forbid "INSERT INTO t () VALUES ();"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk