Received: from mailout3-0.nyroc.rr.com (mailout3-0.nyroc.rr.com [24.92.226.118]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f02EUpL81058 for ; Tue, 2 Jan 2001 09:30:51 -0500 (EST) (envelope-from agreene@twcny.rr.com) Received: from cp5340.localdomain (tmp1-11769.twcny.rr.com [24.161.117.105]) by mailout3-0.nyroc.rr.com (8.9.3/8.9.3) with ESMTP id JAA15747; Tue, 2 Jan 2001 09:26:30 -0500 (EST) Received: (from agreene@localhost) by cp5340.localdomain (8.9.3/8.9.3) id JAA21583; Tue, 2 Jan 2001 09:30:25 -0500 Date: Tue, 2 Jan 2001 09:30:25 -0500 From: "Anthony E . Greene" To: "mdavis @ sevainc . com" Cc: pgsql-admin@postgresql.org Subject: Re: pg_dump/psql < db.out issue Message-ID: <20010102093025.C21436@cp5340> References: <01C07466.38039920.mdavis@sevainc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <01C07466.38039920.mdavis@sevainc.com>; from mdavis@sevainc.com on Tue, Jan 02, 2001 at 04:46:27 -0500 X-Mailer: Balsa 1.0.1 Lines: 23 X-Archive-Number: 200101/6 X-Sequence-Number: 376 On Tue, 02 Jan 2001 04:46:27 Michael Davis wrote: >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. Any idea how to >work around this other than using the -d/-D option in pg_dump? I like the >-d option in pg_dump, however, importing the data via pgsql is much slower >with this option. I used the -D option and pgsql had no problem re-importing data that contained single quotes. It seemed to me that it should have failed because the quotes were not escaped, but it worked anyway. You could try copying the data out to a file, dumping just the schema, then doing the reverse to rebuild the database. The data would be tab-delimited and the quotes would not be an issue. Tony -- Anthony E. Greene PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D Chat: AOL/Yahoo: TonyG05 ICQ: 91183266 Linux. The choice of a GNU Generation.