Re: Is this a buggy behavior?

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Is this a buggy behavior?
Date: 2024-03-24 15:59:29
Message-ID: kcpy5gmmzl2y5mvagzcc4yz2xwhwltvgfeull2euqajmrcy4cv@ri2gs7yj5s4i
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-03-24 16:28 +0100, Thiemo Kellner wrote:
> Am 24.03.2024 um 16:17 schrieb Tom Lane:
>
> > To do that, we'd have to remember that you'd said NULL, which we
> > don't: the word is just discarded as a noise clause. Considering
> > that this usage of NULL isn't even permitted by the SQL standard,
> > that seems like a bit too much work.
>
> "Considering that this usage of NULL isn't even permitted by the SQL
> standard" is in my opinion a strange argument.

I don't know if the SQL standard ever allowed the NULL "constraint", but
the 2003 revision (the oldest one that I've got) does not allow it:

From Part 2, 11.4 <column definition>:

<column constraint> ::=
NOT NULL
| <unique specification>
| <references specification>
| <check constraint definition>

Postgres only accepts it to be compatible with other RDBMS. [1]

[1] https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-NULL

--
Erik

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-03-24 16:08:18 Re: Is this a buggy behavior?
Previous Message Andreas Kretschmer 2024-03-24 15:44:41 Re: Is this a buggy behavior?