Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-09-21 Thread Aleksey Tsalolikhin
On Sun, Sep 2, 2012 at 10:08 PM, Peter Eisentraut wrote: > On Wed, 2012-08-29 at 10:31 -0700, Aleksey Tsalolikhin wrote: >> What is the difference between C and en_US.UTF8, please? > > There are many differences, but here is a simple one: > > $ (echo a; echo A; echo b; echo B) | LC_ALL=C sort > ..

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-09-02 Thread Peter Eisentraut
On Wed, 2012-08-29 at 10:31 -0700, Aleksey Tsalolikhin wrote: > What is the difference between C and en_US.UTF8, please? There are many differences, but here is a simple one: $ (echo a; echo A; echo b; echo B) | LC_ALL=C sort A B a b $ (echo a; echo A; echo b; echo B) | LC_ALL=en_US.utf8 sort a A

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Scott Marlowe
On Wed, Aug 29, 2012 at 2:17 PM, Bruce Momjian wrote: > On Wed, Aug 29, 2012 at 12:52:50PM -0600, Scott Marlowe wrote: >> On Wed, Aug 29, 2012 at 11:43 AM, Bruce Momjian wrote: >> > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: >> >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Bruce Momjian
On Wed, Aug 29, 2012 at 12:52:50PM -0600, Scott Marlowe wrote: > On Wed, Aug 29, 2012 at 11:43 AM, Bruce Momjian wrote: > > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: > >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: > >> > citext unfortunately doesn't allow fo

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Bruce Momjian
On Wed, Aug 29, 2012 at 01:45:20PM -0500, Merlin Moncure wrote: > On Wed, Aug 29, 2012 at 12:43 PM, Bruce Momjian wrote: > > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: > >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: > >> > citext unfortunately doesn't allow f

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Dmitriy Igrishin
2012/8/29 Merlin Moncure > On Wed, Aug 29, 2012 at 12:43 PM, Bruce Momjian wrote: > > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: > >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure > wrote: > >> > citext unfortunately doesn't allow for index optimization of LIKE > >>

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Scott Marlowe
On Wed, Aug 29, 2012 at 11:43 AM, Bruce Momjian wrote: > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: >> > citext unfortunately doesn't allow for index optimization of LIKE >> > queries, which IMNSHO defeats the who

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Merlin Moncure
On Wed, Aug 29, 2012 at 12:43 PM, Bruce Momjian wrote: > On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: >> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: >> > citext unfortunately doesn't allow for index optimization of LIKE >> > queries, which IMNSHO defeats the who

Re: [GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Bruce Momjian
On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote: > On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: > > citext unfortunately doesn't allow for index optimization of LIKE > > queries, which IMNSHO defeats the whole purpose. to the best way > > remains to use lower() ... >

[GENERAL] C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

2012-08-29 Thread Aleksey Tsalolikhin
On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure wrote: > citext unfortunately doesn't allow for index optimization of LIKE > queries, which IMNSHO defeats the whole purpose. to the best way > remains to use lower() ... > this will be index optimized and fast as long as you specified C > locale fo

Re: [GENERAL] C locale + unicode

2005-01-14 Thread John Sidney-Woollett
Thanks for the info - to the point and much appreciated! John Sidney-Woollett Tom Lane wrote: John Sidney-Woollett <[EMAIL PROTECTED]> writes: Do upper() and lower() only work correctly for postgres v8 UTF-8 encoded databases? (They don't seem to work on chars > standard ascii on my 7.4.6 db). Is

Re: [GENERAL] C locale + unicode

2005-01-14 Thread Tom Lane
John Sidney-Woollett <[EMAIL PROTECTED]> writes: > Do upper() and lower() only work correctly for postgres v8 UTF-8 encoded > databases? (They don't seem to work on chars > standard ascii on my > 7.4.6 db). Is this locale or encoding specific issue? Before 8.0, they don't work on multibyte chara

Re: [GENERAL] C locale + unicode

2005-01-14 Thread John Sidney-Woollett
Tom, thanks for the info. Do upper() and lower() only work correctly for postgres v8 UTF-8 encoded databases? (They don't seem to work on chars > standard ascii on my 7.4.6 db). Is this locale or encoding specific issue? Is there likely to be a significant difference in speed between a database

Re: [GENERAL] C locale + unicode

2005-01-14 Thread Tom Lane
John Sidney-Woollett <[EMAIL PROTECTED]> writes: > Does anyone know if it's permitted to use the 'C' locale with a UNICODE > encoded database in 7.4.6? Yes. > And will it work correctly? For suitably small values of "correctly", sure. Textual sort ordering would be by byte values, which might

[GENERAL] C locale + unicode

2005-01-14 Thread John Sidney-Woollett
Does anyone know if it's permitted to use the 'C' locale with a UNICODE encoded database in 7.4.6? And will it work correctly? Or do you have to use a en_XX.utf8 locale if you want to use unicode encoding for your databases? John Sidney-Woollett ---(end of broadcast)

Re: [GENERAL] C locale

2004-03-09 Thread scott.marlowe
On Tue, 2 Mar 2004, Ara Anjargolian wrote: > I've been searching the list archives and the web for a while about which > locale is best used with PostgreSQL and I did not find a satisfactory answer > so I > thought I would ask the list. > > Right now my locale is en_US, but with this you can not

Re: [GENERAL] C locale

2004-03-09 Thread Stephan Szabo
On Tue, 2 Mar 2004, Ara Anjargolian wrote: > I've been searching the list archives and the web for a while about > which locale is best used with PostgreSQL and I did not find a > satisfactory answer so I thought I would ask the list. > > Right now my locale is en_US, but with this you can not use

[GENERAL] C locale

2004-03-09 Thread Ara Anjargolian
I've been searching the list archives and the web for a while about which locale is best used with PostgreSQL and I did not find a satisfactory answer so I thought I would ask the list. Right now my locale is en_US, but with this you can not use standard indexes for LIKE queries, so I am left with