Re: Best way to use indexes for partial match at
От | Andrus |
---|---|
Тема | Re: Best way to use indexes for partial match at |
Дата | |
Msg-id | dkv440$1424$1@news.hub.org обсуждение исходный текст |
Ответ на | Best way to use indexes for partial match at beginning ("Andrus Moor" <eetasoft@online.ee>) |
Ответы |
Re: Best way to use indexes for partial match at
Re: Best way to use indexes for partial match at |
Список | pgsql-general |
>> > How to create primary key without duplicate index on bar column ? >> > >> > Andrus. >> > >> > >> >> you can't. >> postgresql implements primary keys creating unique indexes and not >> null constraints on the pk columns. > > But, of course, you CAN delete that other index now that it's redundant. Scott, thank you. I don't understand how to delete primary key index without removing primary key constraint or how to force primary key to use foo_bar index. I tried CREATE TABLE foo ( bar CHAR(10) PRIMARY KEY ); CREATE UNIQUE INDEX foo_bar ON foo(bar bpchar_pattern_ops); DROP INDEX foo_pkey; but got ERROR: cannot drop index foo_pkey because constraint foo_pkey on table foo requires it Andrus.
В списке pgsql-general по дате отправления: