Re: [ADMIN] invalid byte sequence for encoding UTF8: 0xf481 - how could this happen?

2012-04-16 Thread Albe Laurenz
Rural Hunter wrote: My db is in utf-8, I have a row in my table say tmp_article and I wanted to generate ts_vector from the article content: select to_tsvector(content) from tmp_article; But I got this error: ERROR: invalid byte sequence for encoding UTF8: 0xf481 I am wondering how this

Re: [ADMIN] Recreate primary key without dropping foreign keys?

2012-04-16 Thread Chris Ernst
On 04/15/2012 10:57 PM, Frank Lanitz wrote: On Sun, 15 Apr 2012 18:41:05 -0600 Chris Ernst cer...@zvelo.com wrote: Hi all, In PostgreSQL 9.1.3, I have a few fairly large tables with bloated primary key indexes. I'm trying to replace them using newly created unique indexes as outlined in

Re: [ADMIN] Recreate primary key without dropping foreign keys?

2012-04-16 Thread Frank Lanitz
Am 16.04.2012 10:32, schrieb Chris Ernst: On 04/15/2012 10:57 PM, Frank Lanitz wrote: On Sun, 15 Apr 2012 18:41:05 -0600 Chris Ernst cer...@zvelo.com wrote: Hi all, In PostgreSQL 9.1.3, I have a few fairly large tables with bloated primary key indexes. I'm trying to replace them using

Re: [ADMIN] invalid byte sequence for encoding UTF8: 0xf481 - how could this happen?

2012-04-16 Thread Rural Hunter
=SELECT convert_to(content, 'UTF8') FROM tmp_article; This works. My pg is at latest 9.1.3 on ubuntu 10.04 server. We have millions of data in the db but this is the only one we met the problem. The bad data is inserted in recent days and we upgraded to 9.1.3 right after it was released. 于

Re: [ADMIN] invalid byte sequence for encoding UTF8: 0xf481 - how could this happen?

2012-04-16 Thread Albe Laurenz
Please don't top post. Rural Hunter wrote: My db is in utf-8, I have a row in my table say tmp_article and I wanted to generate ts_vector from the article content: select to_tsvector(content) from tmp_article; But I got this error: ERROR: invalid byte sequence for encoding UTF8: 0xf481 I

Re: [ADMIN] Recreate primary key without dropping foreign keys?

2012-04-16 Thread Chris Ernst
On 04/16/2012 02:39 AM, Frank Lanitz wrote: Am 16.04.2012 10:32, schrieb Chris Ernst: On 04/15/2012 10:57 PM, Frank Lanitz wrote: On Sun, 15 Apr 2012 18:41:05 -0600 Chris Ernst cer...@zvelo.com wrote: Hi all, In PostgreSQL 9.1.3, I have a few fairly large tables with bloated primary key

Re: [ADMIN] invalid byte sequence for encoding UTF8: 0xf481 - how could this happen?

2012-04-16 Thread Rural Hunter
Hi Albe, Yes, I'm using a Chinese tsearch2 plugin called nlpbamboo and the default default_text_search_config is 'chinesecfg'. I tested select to_tsvector('english',content) from tmp_article and this works. So it's the problem of nlpbamboo? The result of 'CAST (content AS bytea)' is shown

Re: [ADMIN] Recreate primary key without dropping foreign keys?

2012-04-16 Thread amador alvarez
How about deferring the FK's while recreating the PK ? or using a temporary parallel table to be pointed by the other tables (FK) and swap it up on the recreation. Cheers, A.A On 04/16/2012 06:54 AM, Chris Ernst wrote: On 04/16/2012 02:39 AM, Frank Lanitz wrote: Am 16.04.2012 10:32, schrieb

Re: [ADMIN] Recreate primary key without dropping foreign keys?

2012-04-16 Thread Chris Ernst
On 04/16/2012 07:02 PM, amador alvarez wrote: How about deferring the FK's while recreating the PK ? or using a temporary parallel table to be pointed by the other tables (FK) and swap it up on the recreation. Hmm.. Interesting. But it appears that you have to declare the foreign key as

Re: [ADMIN] How to auto swtich the roles of primary and standby

2012-04-16 Thread videanuadrian
Hi there, i have the exact same problem. Did you find a solution for this ? thanks, Adrian Videanu -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-auto-swtich-the-roles-of-primary-and-standby-tp4546630p5645680.html Sent from the PostgreSQL - admin mailing list