| От | Gaetano Mendola |
|---|---|
| Тема | Re: Constraint not shown on \d ? |
| Дата | |
| Msg-id | 409CDDC2.9090806@bigfoot.com обсуждение исходный текст |
| Ответ на | Re: Constraint not shown on \d ? (Christopher Kings-Lynne <chriskl@familyhealth.com.au>) |
| Список | pgsql-hackers |
Christopher Kings-Lynne wrote:
>> CREATE UNIQUE INDEX "activation_code_code_key" ON
>> "public"."activation_code"
>> USING btree ("code", "id_code_pool");
>>
>> or
>>
>> ALTER TABLE activation_code ADD UNIQUE ( code, id_code_pool );
>>
>> with \d command there is no difference but is different because the
>> first command
>> create an index deleteable with a "drop index".
>
>
> Yes, you're right. Basically the only difference is that the latter
> will make it a "constraint" that can only be dropped with DROP CONSTRAINT.
but at the end why choose one ot other one, and basic all why
drop index idx_my_index cascade;
doesn't drop the constraint too?
Regards
Gaetano Mendola
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера