Re: Table/Column Constraints

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Table/Column Constraints
Дата
Msg-id 3A1956C4.D68807C7@tm.ee
обсуждение исходный текст
Ответ на Table/Column Constraints  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: Table/Column Constraints  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
Tom Lane wrote:
> 
> "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> > * I assume that the command is supposed to allow the dropping of unique,
> > primary, foreign key and check constraints?  Should 'not null' constraints
> > also be included here?
> 
> Sure.
> 
> > * Unique constraints are implemented as indicies, so dropping a unique
> > constraint maps to dropping the relevant index.
> 
> Or just marking the index non-unique.  Dropping it altogether might be
> bad for query performance.

It also may break the db (make it impossible to update) if some FK
constraints are using it

> > Also - is there some good reason why this hasn't been implemented yet?  Is
> > there some subtle reason, or is it just that no-one's bothered?
> 
> I think no one's got round to it; attention has focused on DROP COLUMN,
> which is a great deal harder.  If you feel like working on DROP
> CONSTRAINT, go for it...

Dumping constraints in human-readable form (instead of CREATE CONSTRAIN
TRIGGER) would also be great.

---------
Hannu


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pl/pgsql slowness
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: pl/pgsql slowness