From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Vik Fearing <vik(at)postgresfriends(dot)org> |
Cc: | pavel(dot)boev(at)invitae(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #16913: GENERATED AS IDENTITY column nullability is affected by order of column properties |
Date: | 2021-03-12 12:59:14 |
Message-ID: | CA+HiwqG6V8=emTcBkZhAOU7bci_QSeSy5wVazEtitGtkEBKVgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Mar 11, 2021 at 11:37 PM Vik Fearing <vik(at)postgresfriends(dot)org> wrote:
> On 3/4/21 3:22 PM, Vik Fearing wrote:
> >
> > I can confirm this bug. Attached is a patch to prevent it.
>
> Would anybody like to take a look at this?
Patch looks reasonable to me.
There seems to be an empty line added at the end, which git diff --check flags:
$ git diff --check
src/test/regress/sql/identity.sql:356: new blank line at EOF.
+-- Identity columns must be NOT NULL (cf bug #16913)
+
+CREATE TABLE itest15 (id integer GENERATED ALWAYS AS IDENTITY NULL); -- fail
+CREATE TABLE itest15 (id integer NULL GENERATED ALWAYS AS IDENTITY); -- fail
+CREATE TABLE itest15 (id integer GENERATED ALWAYS AS IDENTITY NOT
NULL); DROP TABLE itest15;
+CREATE TABLE itest15 (id integer NOT NULL GENERATED ALWAYS AS
IDENTITY); DROP TABLE itest15;
+
--
Amit Langote
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-03-12 15:03:17 | Re: Invalid idle_in_transaction_session_timeout data type |
Previous Message | Amit Langote | 2021-03-12 12:47:18 | Re: posgres 12 bug (partitioned table) |