From: | Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz> |
---|---|
To: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Is this a buggy behavior? |
Date: | 2024-03-25 09:50:22 |
Message-ID: | 4b498806-40f7-45a3-9158-1c93945506bc@gelassene-pferde.biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2024-03-25 13:44:11 | Re: PostgreSQL as advanced job queuing system |
Previous Message | Dominique Devienne | 2024-03-25 09:42:50 | Re: PostgreSQL as advanced job queuing system |