Re: [SQL] Stripping white-space in SELECT statments

2002-09-23 Thread Thorbjörn Eriksson
Thank's Tom Lane & Stephan Szabo for pointing out the problem to me. After some testing it turned out that the swedish locale, 'sv_SE', doesn't handle sorting spaces as expected, which probably made the SELECT fail. On the other hand, if I use the 'C' locale, the SELECT works but not the sort ord

Re: [SQL] Stripping white-space in SELECT statments

2002-09-19 Thread Thorbjörn Eriksson
By "our system" I mean the software that uses the database. It is a quit old software written in C that has been ported a couple of times to different *NIX platforms using different DBMS's. It uses in-house developed functions that, depending on parameters, creates a variety of SQL statements that

[SQL] Stripping white-space in SELECT statments

2002-09-19 Thread Thorbjörn Eriksson
Hello, I've encountered a strange behavior in postgres 7.2.1 regarding how psql handles strings ending with space characters. If I want to search for records where the first column (artnrgrpmtrln_1) begins with '201901 ', our system that uses the database creates the following SQL statement: s