Question about encoding
Is it possible to configure PostgreSQL so that a " LIKE 'a' " query
will match a 'á' value, ie, make it accent-insensitive ?
Thanks in advance,
Daniel Serodio
Is it possible to configure PostgreSQL so that a " LIKE 'a' " query
will match a '�' value, ie, make it accent-insensitive ?
I forgot this was possible using regular expressions. I don't think it is possible using the LIKE
syntax. if you use something like:
select * from yourtable
where yourstring ~ '[=e=]';
http://www.postgresql.org/docs/8.2/interactive/functions-matching.html#POSIX-BRACKET-EXPRESSIONS
Regards,
Richard Broersma Jr.
Is it possible to configure PostgreSQL so that a " LIKE 'a' " query
will match a 'á' value, ie, make it accent-insensitive ?
Maybe something like this can help you:
test=> select to_ascii(convert('tête-à-tête français', 'LATIN9'),'LATIN9');
to_ascii
----------------------
tete-a-tete francais
(1 row)
If your database encoding is already LATIN9, you can omit the convert().
Yours,
Laurenz Albe
Import Notes
Resolved by subject fallback
Richard Broersma Jr wrote:
Is it possible to configure PostgreSQL so that a " LIKE 'a' " query
will match a 'á' value, ie, make it accent-insensitive ?I forgot this was possible using regular expressions. I don't think it is possible using the LIKE
syntax.
What a pity, I've found a point where Microsoft SQL Server is better
than PostgreSQL ! :-)
How should I go about filing an RFE or equivalent?
TIA,
Daniel Serodio