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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Thomas Kellerer <shammat(at)gmx(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Why forbid "INSERT INTO t () VALUES ();"
Date: 2020-06-24 23:03:40
Message-ID: CAKFQuwbsj=F4Td3wYGpBcYmhjEr6-FJNnAHf8deQE6RRKdgqAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 24, 2020 at 3:31 PM Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-06-24 23:15:17 Re: Default setting for enable_hashagg_disk
Previous Message Dagfinn Ilmari Mannsåker 2020-06-24 22:31:00 Re: Why forbid "INSERT INTO t () VALUES ();"