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