Queries with Regular Expressions

From: "Silas Justiniano" <silasju(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Queries with Regular Expressions
Date: 2006-04-06 19:58:45
Message-ID: 58e3b9040604061258i4ca50e18w805b0be416d3a6f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

My queries work fine with Regular Expressions, as:

SELECT field FROM table WHERE field ~ 'something';
SELECT field FROM table WHERE field ~* 'something';
SELECT field FROM table WHERE field ~* 'som[i,e]thing';

And it works fine for special characters:
SELECT field FROM table WHERE field ~* 'chão';

But I just can't make it work correctly using brackets:
SELECT field FROM table WHERE field ~* 'ch[aã]o';

It just returns tuples that have 'chao', but not 'chão'.

My queries are utf-8 an the database is SQL_ASCII.

Any idea? Thank you!

--
Silas Justiniano - Brazil

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Gama Rodrí­guez 2006-04-06 20:10:47 %Re: % tsearch gendict
Previous Message Terry Lee Tucker 2006-04-06 19:57:46 Re: Running Command Line From Trigger?