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

From Fabien COELHO
Subject Re: Why forbid "INSERT INTO t () VALUES ();"
Date
Msg-id alpine.DEB.2.22.394.2006242126030.2665420@pseudo
Whole thread Raw
In response to Re: Why forbid "INSERT INTO t () VALUES ();"  (Thomas Kellerer <shammat@gmx.net>)
Responses Re: Why forbid "INSERT INTO t () VALUES ();"
List pgsql-hackers
Hallo Thomas,

>>   INSERT INTO t() VALUES ();
>>
>> This is forbidden by postgres, and also sqlite.
>>
>> Is there any good reason why this should be the case?
>
> Maybe because
>
>   insert into t default values;
>
> exists (and is standard SQL if I'm not mistaken)

That's a nice alternative I did not notice. Well, not an alternative as 
the other one does not work.

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.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Default setting for enable_hashagg_disk
Next
From: Andres Freund
Date:
Subject: Re: Default setting for enable_hashagg_disk