Re: is this a bug or I am blind?

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: is this a bug or I am blind?
Дата
Msg-id 5.2.1.1.1.20051217212127.02b8cda0@localhost
обсуждение исходный текст
Ответ на Re: is this a bug or I am blind?  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-general
At 11:49 AM 12/17/2005 +0800, Lincoln Yeoh wrote:
>But in a column for license owner names, one might want "tty" and "tyty"
>to be the same - one might have to have a multicolumn index depending on
>the owner's locale of choice.

To make myself clear, one might want to store a person's name in one column
and the locale it belongs to in another column.

I wondering whether it is possible to have something like this:

create table ppl_people (
id serial,
locale text,
name text
);

create index idx_ppl_locale_name on ppl_people
( locale,smash(locale,name))

Then one could do:

select * from ppl_people where
locale=$locale
and smash(locale,name) between smash($locale,$start) and smash($locale,$end)
order by smash(locale,name)

Not sure if that is correct, but hope you can understand me anyway.

Would something like this be possible using the standard SQL syntax and the
COLLATE feature?

Or am I thinking of doing things the wrong way, and there's a better or
more standard way?

Regards,
Link.


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

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: ...
Следующее
От: Leonel Nunez
Дата:
Сообщение: Re: DBlink documentation