Thread: string comparison problem
Hi folks,
I have a problem with identical versions of postgresql - 8.3.13
Config files are identical. HostA is a 32 bit CentOS 5.3 install and the hostB is x86_64 CentOS 6.
Difference in architecture should not be a problem - I have another 64 bit CentOS where both queries are executed displaying identical results.
However, libraries which postgresql is compiled against on host B are significantly newer.
Any thoughts how can this be resolved?
PostgreSQL is compiled from source on both servers.
On hostA :
visa2=# select count(1) from tblapplic where firstname>='george' and firstname<='georgezzzz';
count
-------
392
(1 row)
count
-------
392
(1 row)
visa2=# select count(1) from tblapplic where lower(firstname) like 'george%' ;
count
-------
392
(1 row)
count
-------
392
(1 row)
On hostB :
visa2=# select count(1) from tblapplic where firstname>='george' and firstname<='georgezzzz';
count
-------
7
(1 row)
count
-------
7
(1 row)
visa2=# select count(1) from tblapplic where lower(firstname) like 'george%' ;
count
-------
392
(1 row)
count
-------
392
(1 row)
Thanks,
JE
On 08/01/11 11:12 AM, Johnny Edge wrote: > I have a problem with identical versions of postgresql - 8.3.13 > Config files are identical. HostA is a 32 bit CentOS 5.3 install and > the hostB is x86_64 CentOS 6. > Difference in architecture should not be a problem - I have another 64 > bit CentOS where both queries are executed displaying identical results. > However, libraries which postgresql is compiled against on host B are > significantly newer. > Any thoughts how can this be resolved? > PostgreSQL is compiled from source on both servers. same client encoding on both instances? SHOW CLIENT_ENCODING; SHOW LC_COLLATE; -- john r pierce N 37, W 122 santa cruz ca mid-left coast
Many thanks guys !! Everyone who suggested cause of problem due to LC_COLLATE setting C was correct. Problem is resolved. Apologies for the multiple post. Kind regards, JE -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce Sent: Monday, August 01, 2011 10:58 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] string comparison problem On 08/01/11 11:12 AM, Johnny Edge wrote: > I have a problem with identical versions of postgresql - 8.3.13 Config > files are identical. HostA is a 32 bit CentOS 5.3 install and the > hostB is x86_64 CentOS 6. > Difference in architecture should not be a problem - I have another 64 > bit CentOS where both queries are executed displaying identical results. > However, libraries which postgresql is compiled against on host B are > significantly newer. > Any thoughts how can this be resolved? > PostgreSQL is compiled from source on both servers. same client encoding on both instances? SHOW CLIENT_ENCODING; SHOW LC_COLLATE; -- john r pierce N 37, W 122 santa cruz ca mid-left coast -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general