Search Postgresql Archives

Re: Is this a buggy behavior?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux