Eugene Wang wrote: > Unique Constraint and Unique Index should be the same in this single-column > case, right? > > Because, according to CONSTRAINT page in Postgres Documentation, Unique > Constraint on single column is realized as Unique B-TREE index. > > I have just realized that it is still a btree index, but I think this > example is not exactly a regular btree example. At least I will put the > example as: CREATE INDEX title_idx ON films USING BTREE(title);
Yeah, I see no point for having UNIQUE in that example. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services