pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: thorbjorn.eriksson@ec.se
Cc: pgsql-sql@postgresql.org
Subject: Re: Stripping white-space in SELECT statments
Date: Thu, 19 Sep 2002 10:31:52 -0400
Message-ID: <25711.1032445912@sss.pgh.pa.us> (raw)
In-Reply-To: <MFEPJLNKECPAPFDGGEIMEENJCBAA.thorbjorn.eriksson@ec.se>
References: <MFEPJLNKECPAPFDGGEIMEENJCBAA.thorbjorn.eriksson@ec.se>

=?iso-8859-1?Q?Thorbj=F6rn_Eriksson?= <thorbjorn.eriksson@ec.se> writes:
> I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> handles strings ending with space characters.

Perhaps you are running in a non-C locale?  A lot of locales have
sorting rules that are pretty weird about whitespace.

> The reason that we don't use 'LIKE 201901  %' is that it don't use
> the index

This suggests strongly that you are in a non-C locale.  Your external
software seems to be emulating the standard LIKE-to-index optimization;
which as you are now discovering, does not work with non-C sorting
rules (so the system doesn't try to apply it).

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <25711.1032445912@sss.pgh.pa.us>
Permalink:  ../25711.1032445912@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25711.1032445912@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thorbjorn.eriksson@ec.se
  Subject: Re: Stripping white-space in SELECT statments
  In-Reply-To: <25711.1032445912@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox