Re: null values in non-nullable column

Поиск
Список
Период
Сортировка
От George Pavlov
Тема Re: null values in non-nullable column
Дата
Msg-id 8C5B026B51B6854CBE88121DBF097A866A48A9@ehost010-33.exch010.intermedia.net
обсуждение исходный текст
Ответ на Re: null values in non-nullable column  (Markus Schaber <schabi@logix-tt.com>)
Ответы Re: null values in non-nullable column  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
Yes, the thread did not seem to go very far. The SQL standard does seem
inconsistent in this area, but that is not an argument for allowing data
constraint violation. Until the standard is modified I think it would be
good for the reputation of the DBMS we all love to come up with a fix...


Even though, as Tom Lane explained, CREATE TABLE AS is not the problem
here, it seems to me that might be the cleanest, least obtrusive place
to add validation. If C.T.A failed at the table creation step because of
the JOIN-produces NULLs that would be an early and decent warning.
Fixing it from the JOIN side (e.g. disallowing NULL-generating JOINs on
NOT NULL domains) seems too strict -- JOINs are mostly used for result
sets that are not materialized and you hardly have the potential for a
problem until they are materialized as a table. Similarly, removing the
domain-ness of the JOIN column strikes me as too drastic and as having
the potential of breaking existing functionality. I am sure I am missing
something, just my two cents...

George



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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: Query a select that returns....
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: null values in non-nullable column