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
Re: More ADD CONSTRAINT behaviour questions RE: More ADD CONSTRAINT behaviour questions |
Список | 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 по дате отправления: