Re: Is this a buggy behavior?

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Is this a buggy behavior?
Дата
Msg-id 72EB494A-3644-4B0B-A18B-2672D5842AF5@thebuild.com
обсуждение исходный текст
Ответ на Re: Is this a buggy behavior?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Ответы Re: Is this a buggy behavior?
Список pgsql-general

> On Mar 25, 2024, at 02:50, Thiemo Kellner <thiemo@gelassene-pferde.biz> wrote:
> My bad. I was under the impression that the create table statement was an atomic process/transaction with all its
bellsand whistles for constraints and keys, instead of a succession of alter statements. 

That may be a bit judgmental. :-)  It's not a series of ALTER statements, really.  The basic issue is that the parser
throwsaway a bare NULL very early in the process, so it is not available to consult at the point that PostgreSQL is
creatingthe constraint.  The underlying implementation of the actual table creation isn't the issue here. 

There seems to be general consensus that:

1. It would be handy to have a warning in the particular case that NULL is specified, however,
2. It would be undesirable to have a warning in the case where no NULL at all is specified, which means,
3. The presence of an existing bare NULL would have to be retained through the whole process, which is,
4. Not trivial.

The reason the SQL standard is relevant here is that if bare NULL were part of the standard, that would be an argument
fortaking the pains.  Since it's not, it's not clear that doing the work to add the warning is worth the effort. 


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: PostgreSQL as advanced job queuing system
Следующее
От: Christophe Pettus
Дата:
Сообщение: No warning for a no-op REVOKE