Re: Scope of constraint names

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Scope of constraint names
Дата
Msg-id 1025655312.232.293.camel@jester
обсуждение исходный текст
Список pgsql-hackers
> One problem I see is that pg_constraint entries can *only* be associated
> with relations; so the table has no way to represent constraints
> associated with domains --- not to mention assertions, which aren't

It's ugly, but one could make the relid 0, and add a typeid which is
non-zero to represent a constraint against a domain.  Relation
constraints have typeid 0 and relid as a normal number.

Obviously I prefer unique constraint names mostly for my users.  For
some reason they tend to try to make assumptions about a constraint
given the name and have been fooled about what the constraint actually
is more than once due to 'having seen it before elsewhere'.

Is applying a lock on the pg_constraint table really that bad during
creation?  Sure, you could only make one constraint at a time -- but
thats the same with relations, types, and a fair number of other things
that are usually created at the same time (or same transaction) as most
constraints will be.







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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: elog() proposals
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: (A) native Windows port