More ADD CONSTRAINT behaviour questions

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема More ADD CONSTRAINT behaviour questions
Дата
Msg-id ECEHIKNFIMMECLEBJFIGGEDJCBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: More ADD CONSTRAINT behaviour questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: More ADD CONSTRAINT behaviour questions  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
RE: More ADD CONSTRAINT behaviour questions  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
When someone issues this command:

ALTER TABLE test ADD UNIQUE (a, b);

What happens when:

1. A non-unique index is already defined over (a, b)
- Either add new index or promote existing one to unique?

2. A non-unique index is already defined over (b, a)
- As above?

3. A primary index is already defined over (a, b)
- ERROR: unique already implied by primary?

4. A primary index is already defined over (b, a)
- As above?

5. A unique index is already defined over (a, b)
- ERROR: unique index already exists over keys?

6. A unique index is already defined over (b, a)
- As above.  Technically a different index, but effect  as far as uniqueness is concerned is identical?

7. No index exists over (a, b) or (b, a)
- Create a new unique index over (a, b)?

Chris




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timestamp not consistent with documentation or standard
Следующее
От: Bruce Momjian
Дата:
Сообщение: Mozilla 1.0 release soon?