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

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why forbid "INSERT INTO t () VALUES ();"
Date: 2020-06-24 12:23:08
Message-ID: 31782555-7bc7-97f5-657b-9a7ee7636c55@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2020-06-24 12:24:29 Re: Default setting for enable_hashagg_disk
Previous Message Fabien COELHO 2020-06-24 12:18:01 Why forbid "INSERT INTO t () VALUES ();"