pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: mdavis@sevainc.com <mdavis@sevainc.com>
Cc: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Cc: 'pgsql-general@postgresql.org' <pgsql-general@postgresql.org>
Subject: Re: pg_dump/psql < db.out issue
Date: Tue, 02 Jan 2001 11:44:45 -0500
Message-ID: <12702.978453885@sss.pgh.pa.us> (raw)
In-Reply-To: <01C07466.38039920.mdavis@sevainc.com>
References: <01C07466.38039920.mdavis@sevainc.com>

Michael Davis <mdavis@sevainc.com> 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



view thread (4+ messages)  latest in thread

Message-ID: <12702.978453885@sss.pgh.pa.us>
Permalink:  ../12702.978453885@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12702.978453885@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, mdavis@sevainc.com, pgsql-general@postgresql.org
  Subject: Re: pg_dump/psql < db.out issue
  In-Reply-To: <12702.978453885@sss.pgh.pa.us>
  References: <01C07466.38039920.mdavis@sevainc.com> <12702.978453885@sss.pgh.pa.us>

* 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