pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anthony E . Greene <agreene@pobox.com>
To: mdavis @ sevainc . com <mdavis@sevainc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump/psql < db.out  issue
Date: Tue, 2 Jan 2001 09:30:25 -0500
Message-ID: <20010102093025.C21436@cp5340> (raw)
In-Reply-To: <01C07466.38039920.mdavis@sevainc.com>
References: <01C07466.38039920.mdavis@sevainc.com>

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 <agreene@pobox.com> <http://www.pobox.com/~agreene/;
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. <http://www.linux.org/;



view thread (4+ messages)  latest in thread

Message-ID: <20010102093025.C21436@cp5340>
Permalink:  ../20010102093025.C21436@cp5340/
Also on:    postgresql.org/message-id/20010102093025.C21436@cp5340

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: agreene@pobox.com, mdavis@sevainc.com
  Subject: Re: pg_dump/psql < db.out  issue
  In-Reply-To: <20010102093025.C21436@cp5340>
  References: <01C07466.38039920.mdavis@sevainc.com> <20010102093025.C21436@cp5340>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox