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

From Thomas Kellerer
Subject Re: Why forbid "INSERT INTO t () VALUES ();"
Date
Msg-id 31782555-7bc7-97f5-657b-9a7ee7636c55@gmx.net
Whole thread Raw
In response to Why forbid "INSERT INTO t () VALUES ();"  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Why forbid "INSERT INTO t () VALUES ();"
List pgsql-hackers
Fabien COELHO schrieb am 24.06.2020 um 14:18:
> I would like to create an "all defaults" row, i.e. a row composed of the default values for all attributes, so I
wrote:
>
>   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)

Thomas




pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Why forbid "INSERT INTO t () VALUES ();"
Next
From: David Rowley
Date:
Subject: Re: Default setting for enable_hashagg_disk