Re: [GENERAL] finding rows with invalid characters

2010-11-30 Thread Jasen Betts
On 2010-11-21, Sim Zacks s...@compulab.co.il wrote: I am using PG 8.2.17 with UTF8 encoding. PostgreSQL 8.2.17 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.1 (Gentoo 4.1.1) One of my tables somehow has invalid characters in it: ERROR: invalid byte sequence for encoding UTF8: 0xa9

Re: [GENERAL] finding rows with invalid characters

2010-11-23 Thread Sim Zacks
Thanks for your help. I think a trigger will actually be the easiest. The way i can tell if there is invalid data is simply to do an Upper(text) and if it has invalid data it fails. I dumped the fixed database. Now I have a years worth of backups that I can't restore a specific table from.

Re: [GENERAL] finding rows with invalid characters

2010-11-23 Thread Dmitriy Igrishin
Sim, are you sure that encoding of the dump and the database in which you are trying to restore it are same ? 2010/11/23 Sim Zacks s...@compulab.co.il Thanks for your help. I think a trigger will actually be the easiest. The way i can tell if there is invalid data is simply to do an

[GENERAL] finding rows with invalid characters

2010-11-21 Thread Sim Zacks
I am using PG 8.2.17 with UTF8 encoding. PostgreSQL 8.2.17 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.1 (Gentoo 4.1.1) One of my tables somehow has invalid characters in it: ERROR: invalid byte sequence for encoding UTF8: 0xa9 HINT: This error can also happen if the byte sequence

Re: [GENERAL] finding rows with invalid characters

2010-11-21 Thread Dmitriy Igrishin
Hey Sim, Maybe this helps: http://blog.tapoueh.org/articles/blog/_Getting_out_of_SQL_ASCII,_part_2.html 2010/11/21 Sim Zacks s...@compulab.co.il I am using PG 8.2.17 with UTF8 encoding. PostgreSQL 8.2.17 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.1 (Gentoo 4.1.1) One of my tables