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

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-25 08:39:16
Message-ID: d3f60110-f283-ebb9-9888-b857c7701048@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/25/20 6:56 AM, Fabien COELHO wrote:
>
> Hello Tom,
>
>>>>>   INSERT INTO t() VALUES ();
>>
>>> I'm still unclear why it would be forbidden though, it seems logical to
>>> try that, whereas the working one is quite away from the usual syntax.
>>
>> It's forbidden because the SQL standard forbids it.
>
> Ok, that is definitely a reason. I'm not sure it is a good reason, though.

It's a very good reason. It might not be good *enough*, but it is a
good reason.

> Why would the standard forbid it? From the language design point of
> view[...]

Don't go there. There is nothing but pain there.

--
Vik Fearing

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-06-25 09:01:51 Re: Backpatch b61d161c14 (Introduce vacuum errcontext ...)
Previous Message Kyotaro Horiguchi 2020-06-25 08:28:03 Re: Review for GetWALAvailability()