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

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Why forbid "INSERT INTO t () VALUES ();"
Date: 2020-06-24 12:18:01
Message-ID: alpine.DEB.2.22.394.2006241409070.2453952@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello devs,

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?

--
Fabien.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Kellerer 2020-06-24 12:23:08 Re: Why forbid "INSERT INTO t () VALUES ();"
Previous Message Robert Haas 2020-06-24 11:59:47 Re: [HACKERS] Custom compression methods