Re: Why forbid "INSERT INTO t () VALUES ();" - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Why forbid "INSERT INTO t () VALUES ();"
Date
Msg-id CAKFQuwbsj=F4Td3wYGpBcYmhjEr6-FJNnAHf8deQE6RRKdgqAg@mail.gmail.com
Whole thread Raw
In response to Re: Why forbid "INSERT INTO t () VALUES ();"  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
List 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 by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: Why forbid "INSERT INTO t () VALUES ();"
Next
From: Bruce Momjian
Date:
Subject: Re: Default setting for enable_hashagg_disk