select (\'ã\' ~* \'Ã\')=true while select (\'ã\' ilike \'Ã\')

I have a freshly compiled installation of postresql on ubuntu 9.10.

Why select ('ã' ~* 'Ã') = ('ã' ilike 'Ã') IS FALSE ?

encoding is set correctly.

While ilike works correctly ~* doesn't why ?



--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
desoft [ Do, 25 Februar 2010 19:14 ] [ ID #2034645 ]

Re: select (\'*\' ~* \'*\')=true while select (\'*\' ilike \'*\')

<desoft [at] freemail.gr> wrote:

> I have a freshly compiled installation of postresql on ubuntu
> 9.10.

What PostgreSQL version? Compiled with what configuration options?

> encoding is set correctly.

To what? With what character set, collation, etc.?

You've posted some of the information needed to understand the
problem, but please review this for ideas on what else might help
people identify the cause:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner [ Do, 11 März 2010 17:38 ] [ ID #2034646 ]

Re: select (\' \' ~* \' \')=true while select (\' \' ilike \' \')

desoft [at] 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.B13 93753FB7 [at] 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Tom Lane [ Do, 11 März 2010 17:50 ] [ ID #2034647 ]
Datenbanken » gmane.comp.db.postgresql.admin » select (\'ã\' ~* \'Ã\')=true while select (\'ã\' ilike \'Ã\')

Vorheriges Thema: remote pg_dump hangs always at same table
Nächstes Thema: pg_switch_xlog