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
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly