Re: Is this a buggy behavior?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Is this a buggy behavior?
Дата
Msg-id 1b43161b9e7223f77227b7a297dad6de344acdc5.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Is this a buggy behavior?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Ответы Re: Is this a buggy behavior?
Список pgsql-general
On Sun, 2024-03-24 at 17:32 +0100, Thiemo Kellner wrote:
> > The reason it doesn't give you a warning is that by the time it would
> > be in a position to, it's forgotten that you explicitly said NULL.
>
> 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.

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

Perhaps you'd want that, but you are one of the few who do.
You'll have to get used to the way it is.

Yours,
Laurenz Albe



В списке pgsql-general по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Not able to purge partition
Следующее
От: "Bandi, Venkataramana - Dell Team"
Дата:
Сообщение: RE: Query on Postgres SQL transaction