Re: Curious sorting puzzle

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

 



Tom Lane wrote:

An ideal solution would be to have a "not-locale-affected-varchar" field type :)


If you're just storing ASCII then I think bytea might work for this.
Do you need any actual text operations (like concatenation), or this
just a store-and-retrieve field?

I've just tested bytea and it looks like a perfect solution - it supports:

- character-like syntax
- indexes
- uses indexes with LIKE 'x%' queries
- SUBSTRING()

That's good enough for us - it seems it's just what we need - a string-like type with byte collation.

Thanks!


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux