Search Postgresql Archives

Re: Is this a buggy behavior?

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

 





Am 25.03.2024 um 07:59 schrieb Laurenz Albe:
On Sun, 2024-03-24 at 17:32 +0100, Thiemo Kellner wrote:
How can that be forgotten? This information ends up in the data
catalogue eventually!

It *is* stored in the catalog.

But if you add a primary key, that is tantamount to saying

   ALTER TABLE tab ALTER col SET NOT NULL;
>
> So it overrides the definition you made before.
>

My bad. I was under the impression that the create table statement was an atomic process/transaction with all its bells and whistles for constraints and keys, instead of a succession of alter statements.

Or would you want the above statement to cause an error just
because somebody had defined the column nullable before?

When getting contradictory information, I just would ask back what really was meant. But as a succession of alter statements, there is no contradiction. In that case, no.

Kind regards and thanks for the insights.

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