Re: Regular expressions w localization problem - Mailing list pgsql-general

From Tom Lane
Subject Re: Regular expressions w localization problem
Date
Msg-id 24837.1132946461@sss.pgh.pa.us
Whole thread Raw
In response to Regular expressions w localization problem  (Manuel Sugawara <masm@fciencias.unam.mx>)
Responses Re: Regular expressions w localization problem  (Manuel Sugawara <masm@fciencias.unam.mx>)
List pgsql-general
Manuel Sugawara <masm@fciencias.unam.mx> writes:
> I'm facing a problem I have seen before but never got the time to
> report until now that is biting me again. I have a table which has
> some CHECK constrains using regular expressions and one check is
> failing when I try to insert some valid data. The constraint
> definition is:

> �nombre propio v�lido� CHECK (nombre ~ '^[[:upper:]][[:lower:]]*([-\'. [:alpha:]]+)?$'::text)

> And the data is ``Jos� Luis''.

I believe the meanings of [[:upper:]] and friends depend on the database
locale, and the current code for them probably doesn't work at all in
multibyte database encodings either.  So, what locale and encoding
are you using?

            regards, tom lane

pgsql-general by date:

Previous
From: Gregory Youngblood
Date:
Subject: Resend: Question about PostgreSQL, pgpool, and Postfix
Next
From: Manuel Sugawara
Date:
Subject: Re: Regular expressions w localization problem