Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 16B036501F0 for ; Mon, 4 Aug 2008 01:39:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 99324-03 for ; Mon, 4 Aug 2008 01:39:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from renaissance-it.com (unknown [164.164.87.55]) by postgresql.org (Postfix) with ESMTP id 16F5A65037C for ; Mon, 4 Aug 2008 01:19:24 -0300 (ADT) Received: (qmail 7300 invoked by uid 109); 4 Aug 2008 04:18:43 -0000 Received: from 192.168.1.6 by sritmail (envelope-from , uid 112) with qmail-scanner-1.25st (perlscan: 1.25st. Clear:RC:1(192.168.1.6):. Processed in 0.010145 secs); 04 Aug 2008 04:18:43 -0000 Received: from unknown (HELO praveenkm) (praveen.k@[192.168.1.6]) (envelope-sender ) by renaissance-it.com (qmail-ldap-1.03) with SMTP for ; 4 Aug 2008 04:18:42 -0000 Message-ID: <011201c8f5e9$e24fba00$274610ac@praveenkm> From: "Praveen" To: "Andrew Goodnough" , References: Subject: Re: client_encoding error on load Date: Mon, 4 Aug 2008 09:53:45 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_010F_01C8F617.FBEB6D50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.101 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200808/11 X-Sequence-Number: 29856 This is a multi-part message in MIME format. ------=_NextPart_000_010F_01C8F617.FBEB6D50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable It will better you export and import through network by using following = command. psql -U < schemaname > < databasename> --schema=3Dschemaname | psql = -U postgres -h < IP adddress of system where you are importing data> = ----- Original Message -----=20 From: Andrew Goodnough=20 To: pgsql-admin@postgresql.org=20 Sent: Monday, August 04, 2008 7:29 AM Subject: [ADMIN] client_encoding error on load I'm using these commands to perform a dump and load. pg_dump -c lakevie_typo | gzip > $HOME/backups/typo_$DATE.sql.gz gzip < $HOME/backups/typo_$DATE.sql.gz |psql -d lakevie_typobak -f - The dump is fine but the load only works if I first extract the sql, = then run it. Running it using the pipe to psql, I get: psql::71: ERROR: invalid byte sequence for encoding "UTF8": = 0x8b HINT: This error can also happen if the byte sequence does not match = the encoding expected by the server, which is controlled by = "client_encoding". yet, doing a 'psql -l' shows this database to be UTF-8. And the dump = file says: SET client_encoding =3D 'UTF8'; My goal is to get the two line dump/load working so I don't have any = manual steps and sql files laying around. Any ideas? Andy ------=_NextPart_000_010F_01C8F617.FBEB6D50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
It will better you export and import = through=20 network by using following command.
psql -U < schemaname >  < = databasename>   --schema=3Dschemaname | psql  -U = postgres =20 -h < IP adddress of system where you are importing data> = <database=20 name>
----- Original Message -----
From:=20 Andrew=20 Goodnough
Sent: Monday, August 04, 2008 = 7:29=20 AM
Subject: [ADMIN] = client_encoding error on=20 load

I'm using these commands to perform a dump and=20 load.

pg_dump -c lakevie_typo | gzip >=20 $HOME/backups/typo_$DATE.sql.gz
gzip < = $HOME/backups/typo_$DATE.sql.gz=20 |psql -d lakevie_typobak -f -

The dump is fine but the load = only works=20 if I first extract the sql, then run it.  Running it using the = pipe to=20 psql, I get:

psql:<stdin>:71: ERROR:  invalid byte = sequence=20 for encoding "UTF8": 0x8b
HINT:  This error can also happen if = the=20 byte sequence does not match the encoding expected by the server, = which is=20 controlled by "client_encoding".

yet, doing a 'psql -l' shows = this=20 database to be UTF-8.  And the dump file says:

SET = client_encoding=20 =3D 'UTF8';


My goal is to get the two line dump/load = working so I=20 don't have any manual steps and sql files laying around.  Any=20 ideas?

Andy
------=_NextPart_000_010F_01C8F617.FBEB6D50--