Search Postgresql Archives

Re: Regular expressions w localization problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manuel Sugawara <masm@xxxxxxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux