Re: Best practices for moving UTF8 databases - Mailing list pgsql-general

From Daniel Verite
Subject Re: Best practices for moving UTF8 databases
Date
Msg-id eb904c27-e670-4274-8e61-68b71169f787@mm
Whole thread Raw
In response to Re: Best practices for moving UTF8 databases  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Responses Re: Best practices for moving UTF8 databases
List pgsql-general
    Phoenix Kiula wrote:


> I'd love to fix them. But if I do a search for
>
> SELECT * FROM xyz WHERE col like '%0x80%'
>
> it doesn't work. How should I search for these characters?

In 8.2, try: WHERE strpos(col, E'\x80') > 0

Note that this may find valid data as well, because the error you get
is when 0x80 is the first byte of a character in UTF8; when it's at
another position, you don't want to change it.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

pgsql-general by date:

Previous
From: Janning Vygen
Date:
Subject: Re: suggestion: log_statement = sample
Next
From: Janning Vygen
Date:
Subject: Re: suggestion: log_statement = sample