Re: ADD/DROP constraints

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: ADD/DROP constraints
Дата
Msg-id 1149799422.3918.15.camel@localhost.localdomain
обсуждение исходный текст
Ответ на ADD/DROP constraints  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Ühel kenal päeval, N, 2006-06-08 kell 16:30, kirjutas Greg Stark:
> 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.

You could find some infrastructure for "stronger constraint" recognition
in constraint exclusion code, if you want to go that way.

> 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.

Currently pg_dump generates all constraints with ONLY clause anyway.

But I agree that we should get rid of ONLY for ADD CONSTRAINT once we
disallow dropping inherited constraints.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ADD/DROP INHERITS
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: That EXPLAIN ANALYZE patch still needs work