Re: Scope of constraint names

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Scope of constraint names
Дата
Msg-id Pine.LNX.4.44.0207072313440.930-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Scope of constraint names  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Scope of constraint names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> A considerable advantage of per-relation constraint names is that a new
> unique name can be assigned for a nameless constraint while holding only
> a lock on the target relation.  We'd need a global lock to create unique
> constraint names in the SQL92 semantics.

Presumably, the field pg_class.relchecks already keeps a count of the
number of constraints, so it should be possible to assign numbers easily.

> The only way I can see around that would be to use newoid(), or perhaps
> a dedicated sequence generator, to construct constraint names.  The
> resulting unpredictable constraint names would be horribly messy to deal
> with in the regression tests, so I'm not eager to do this.

Or we simply assign constraint names explicitly in the regression tests.

-- 
Peter Eisentraut   peter_e@gmx.net





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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Proposal: CREATE CONVERSION
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Most system catalog columns should be NOT NULL