pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: pgsql-sql@hub.org
Cc: pgsql-hackers@postgreSQL.org <pgsql-hackers@postgresql.org>
Subject: pg_dump bug (was Re: [SQL] Slow Inserts Again)
Date: Mon, 03 May 1999 12:01:31 -0500
Message-ID: <372DD66B.82BF86E3@rice.edu> (raw)
References: <l03130306b35361d4928b@[147.233.159.109]>

Herouth Maoz wrote: 
> It's all in the docs. Why don't you try to copy some of the rows into a
> temporary table, and dump that table using pg_dump -a -t table_name dbname?
> It may give you a clue.

this is unrelated to the slow insert bug, but Herouth's suggestion
reminded me of something that needs to be looked at before 6.5 is out of
beta: pg_dump seems to have problems with mixed case tablenames. There
doesn't seem to be a way to send a quoted tablename into pg_dump as the
value for a -t option, in 6.4.2 (example below). Can someone try this on
6.5beta? I know some issues with quoting output of pg_dump (i.e. COPY)
was addressed, I'm wondering if input parsing got touched.

Actually, groveling through the source, it looks like even 6.4.2 should
"do the right thing": the query is built with the class (table) name
wrapped with fmtId(), which should do exactly this quoting. Anyone else
see this?

P.S. shouldn't the non existence of the table handed to pg_dump raise a
user visible error?

P.P.S. How does one go about setting up a second version of PG to test
on the same machine, without interference with the production (older)
version? I've only got the one machine to test on.


test=> create table TestTable (a int, b text);
CREATE
test=> create table "TestTable" (c int, d text);
CREATE
test=> \q
$ pg_dump -t TestTable test
CREATE TABLE "testtable" (
        "a" int4,
        "b" text);
COPY "testtable" FROM stdin;
\.
$ pg_dump -t "TestTable" test
CREATE TABLE "testtable" (
        "a" int4,
        "b" text);
COPY "testtable" FROM stdin;
\.
$ pg_dump -t \"TestTable\" test
$ pg_dump  test
CREATE TABLE "testtable" (
        "a" int4,
        "b" text);
CREATE TABLE "TestTable" (
        "c" int4,
        "d" text);
COPY "testtable" FROM stdin;
\.
COPY "TestTable" FROM stdin;
\.



-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005



view thread (4+ messages)  latest in thread

Message-ID: <372DD66B.82BF86E3@rice.edu>
Permalink:  ../372DD66B.82BF86E3@rice.edu/
Also on:    postgresql.org/message-id/372DD66B.82BF86E3@rice.edu

 · 

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-sql@postgresql.org
  Cc: reedstrm@rice.edu, pgsql-sql@hub.org, pgsql-hackers@postgresql.org
  Subject: Re: pg_dump bug (was Re: [SQL] Slow Inserts Again)
  In-Reply-To: <372DD66B.82BF86E3@rice.edu>
  References: <l03130306b35361d4928b@[147.233.159.109]> <372DD66B.82BF86E3@rice.edu>

* 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