Search Postgresql Archives

Re: is this a bug or I am blind?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux