Re: Request: set opclass for generated unique and primary key indexes

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Request: set opclass for generated unique and primary key indexes
Дата
Msg-id BAY20-F8AF4831EF3A6FC853FE4AF9FD0@phx.gbl
обсуждение исходный текст
Ответ на Re: Request: set opclass for generated unique and primary key indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Request: set opclass for generated unique and primary  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-hackers

>Why would you need it?
I can't to use unique index for like_op without setting opclass, because I 
have to use czech locale. I can create second index, but then I have two 
equal indexes. Example:

number |  description
000102  blabla bla
000103  bbbb fooo

number: varchar primary key.

Sometimes I need search all values with one prefix ~ like '0001%'. That's 
all.

>
> >   USING INDEX [TABLESPACE ..] [OPCLASS ..]
>
>This is unworkable --- consider a table with more than one unique
>constraint and/or multiple-column constraints.
>
I forgot (full syntax is):
CREATE TABLE ....  number varchar PRIMARY KEY USING OPCLAS varchar_pattern_ops, ...
>I seem to recall someone proposing extending the syntax of the UNIQUE
>constraints themselves, but there really isn't enough use-case to
>justify it AFAICS.  Especially not when you can always use CREATE UNIQUE
>INDEX.

I can always use second unique index. But it's redundant. This problem is 
related to using nonC locale.

Regards
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Pgfoundry and gborg: shut one down
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Request: set opclass for generated unique and primary