Re: Is this a buggy behavior? - Mailing list pgsql-general

From Thiemo Kellner
Subject Re: Is this a buggy behavior?
Date
Msg-id 51eb3063-1d90-40c6-a8c6-9a77fe105a61@gelassene-pferde.biz
Whole thread Raw
In response to Re: Is this a buggy behavior?  (Erik Wienhold <ewie@ewie.name>)
Responses Re: Is this a buggy behavior?
List pgsql-general
Am 24.03.2024 um 15:54 schrieb Erik Wienhold:
> 
> This is required by the SQL standard: columns of a primary key must be
> NOT NULL.  Postgres automatically adds the missing NOT NULL constraints
> when defining a primary key.  You can verify that with \d test1 in psql.

To me, this behaviour, while correct, is not too concise. I wished, that 
PG issued a warning about a definition conflict. In PostgreSQL, a PK 
must always be not nullable, so explicitly defining on of a PK's columns 
as nullable is contradictory, one should get notified of.

The two dimes of Thiemo



pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Not able to purge partition
Next
From: Tom Lane
Date:
Subject: Re: Is this a buggy behavior?