Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id 1311172567-sup-1219@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: cataloguing NOT NULL constraints
Список pgsql-hackers
Excerpts from Peter Eisentraut's message of sáb jul 09 14:45:23 -0400 2011:
> On tor, 2011-07-07 at 17:34 -0400, Alvaro Herrera wrote:
> > The attached patch introduces pg_constraint rows for NOT NULL
> > column constraints.
> 
> The information schema views check_constraints and table_constraints
> currently make up some artificial constraint names for not-null
> constraints.  I suppose this patch removes the underlying cause for
> that, so could you look into updating the information schema as well?
> You could probably just remove the separate union branches for not null
> and adjust the contype conditions.

Fixing table_constraints is pretty trivial, just like you suggest;
already done in my private tree.

I checked the check_constraints definition in the standard and it's not
clear to me that NOT NULL constraints are supposed to be there at all.
Are NOT NULL constraints considered to be CHECK constraints too?

The fix is trivial either way: if they are not to be there we should
just remove the UNION arm that deals with them.  If they are, we do
likewise and then fix the other arm as you suggest.

Thanks for the pointer.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: lazy vxid locks, v3
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Another issue with invalid XML values