Received: from mail01.phoenixdsl.com (mail.phoenixdsl.com [216.178.151.24]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f02LUYO80677 for ; Tue, 2 Jan 2001 16:30:34 -0500 (EST) (envelope-from mdavis@sevainc.com) Received: (qmail 79934 invoked by uid 89); 2 Jan 2001 21:31:13 -0000 Received: from unknown (HELO SALLY) (64.32.157.45) by 0 with SMTP; 2 Jan 2001 21:31:13 -0000 Received: by localhost with Microsoft MAPI; Tue, 2 Jan 2001 14:31:11 -0700 Message-ID: <01C074C8.A7836020.mdavis@sevainc.com> From: Michael Davis Reply-To: "mdavis@sevainc.com" To: "'Tom Lane'" Cc: "'pgsql-admin@postgresql.org'" , "'pgsql-general@postgresql.org'" Subject: RE: pg_dump/psql < db.out issue Date: Tue, 2 Jan 2001 14:31:02 -0700 Organization: Seva Inc. X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/9 X-Sequence-Number: 379 Thanks for pointing this out. I tested this again and it works great. I have been trying to make sure I understand how to recreate a database from the dump files. The error I was seeing must have been caused by something else. Sorry for the trouble and thanks for the response. -----Original Message----- From: Tom Lane [SMTP:tgl@sss.pgh.pa.us] Sent: Tuesday, January 02, 2001 9:45 AM To: mdavis@sevainc.com Cc: 'pgsql-admin@postgresql.org'; 'pgsql-general@postgresql.org' Subject: Re: pg_dump/psql < db.out issue Michael Davis writes: > I have several tables with text fields that contain single quotes ('). > Pg_dump exports these tables and the single quotes (') okay. Psql, > however, will not import the data into the tables because of the single > quote (') in one of the columns in one of the records. Huh? That's worked just fine for a long time. What version are you running? play=> select * from foo; f1 ---------- I'm here (1 row) play=> \q $ pg_dump -t foo play >quote.sql $ cat quote.sql \connect - tgl CREATE TABLE "foo" ( "f1" text ); COPY "foo" FROM stdin; I'm here \. $ psql play Welcome ... play=> drop table foo; DROP play=> \i quote.sql You are now connected as new user tgl. CREATE play=> select * from foo; f1 ---------- I'm here (1 row) play=> regards, tom lane