pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: desoft@freemail.gr
Cc: pgsql-admin@postgresql.org
Subject: Re: select (\' \' ~* \' \')=true while select (\' \' ilike \' \')
Date: Thu, 11 Mar 2010 11:50:44 -0500
Message-ID: <21728.1268326244@sss.pgh.pa.us> (raw)
In-Reply-To: <4b86bdeb03d3c8.17572985@freemail.gr>
References: <4b86bdeb03d3c8.17572985@freemail.gr>

desoft@freemail.gr writes:
> encoding is set correctly.

To what?

> While ilike works correctly ~* doesn't why ?

~* is known to have issues in multibyte encodings (eg UTF8).
Fixing this is on the TODO list, but nobody's thought of a
reasonably clean fix yet.

There is a partial solution in place for 9.0 --- it should work for
UTF8, though not for other multibyte encodings.  If you're feeling
desperate you could try backpatching this commit:
http://archives.postgresql.org/message-id/20091201210024.B1393753FB7@cvs.postgresql.org
However the path of least resistance might be to use a single-byte
encoding in your database, such as LATIN1.

			regards, tom lane



Message-ID: <21728.1268326244@sss.pgh.pa.us>
Permalink:  ../21728.1268326244@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21728.1268326244@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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, desoft@freemail.gr
  Subject: Re: select (\' \' ~* \' \')=true while select (\' \' ilike \' \')
  In-Reply-To: <21728.1268326244@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