ADD/DROP constraints

Поиск
Список
Период
Сортировка
От Greg Stark
Тема ADD/DROP constraints
Дата
Msg-id 873befjspt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответы Re: ADD/DROP constraints  (Hannu Krosing <hannu@skype.net>)
Re: ADD/DROP constraints  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: ADD/DROP constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On a separate note. The one major remaining piece here is in constraints. I'm
thinking what I have to check is that every constraint present on the parent
table is present on the child tables. And I'm thinking I should do that by
looking at the constraint's textual definition (consrc).

This doesn't allow you to get by with a single stronger constraint -- you
would still need the redundant looser constraint to satisfy the inheritance.

But it does let you get by with constraint names that don't match the
parent's.

I'm not sure that's such a good thing, since pg_dump would then generate a
redundant constraint when it generates the table. Maybe that would go if
constraints got conislocal and coninh.

Or maybe I should insist that a matching constraint name be present *and* that
the source text match? That's more of a pain to code though.

Is there a convenient hash module in the source for small simple hashes that
don't require disk spilling? Just a string->string thing I could look up
constraint definitions by name from?

-- 
greg



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ADD/DROP INHERITS
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: PG 8.2