Re: Is this a buggy behavior?
От | Thiemo Kellner |
---|---|
Тема | Re: Is this a buggy behavior? |
Дата | |
Msg-id | 4b498806-40f7-45a3-9158-1c93945506bc@gelassene-pferde.biz обсуждение исходный текст |
Ответ на | Re: Is this a buggy behavior? (Laurenz Albe <laurenz.albe@cybertec.at>) |
Ответы |
Re: Is this a buggy behavior?
|
Список | 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
В списке pgsql-general по дате отправления: