Re: [HACKERS] odd pg_dump output?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: hackers(at)postgreSQL(dot)org, t-ishii(at)srapc451(dot)sra(dot)co(dot)jp
Subject: Re: [HACKERS] odd pg_dump output?
Date: 1998-08-29 02:54:49
Message-ID: 199808290254.WAA27648@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I found that current pg_dump command produces wrong output if a table
> name includes upper letters (See below).
>
> in bin/pg_dump.c:
>
> sprintf(q, "CREATE TABLE \"%s\" (", fmtId(tblinfo[i].relname));
>
> Here fmtId() returns double quoted results if the table name (or
> attribute name, index name...) has upper letters. then sprintf adds
> extra double quotations. The result is too much double quotations!
>
> I don't understand why sprintf adds extra quotes (I think 6.3.2
> didn't).
> Comments?
> --
> Tatsuo Ishii
> t-ishii(at)sra(dot)co(dot)jp

This appears to be fixed. Beta is September 1.

> ---------------------------------------------------------------
> Welcome to the POSTGRESQL interactive sql monitor:
> Please read the file COPYRIGHT for copyright terms of POSTGRESQL
>
> type \? for help on slash commands
> type \q to quit
> type \g or terminate with semicolon to execute query
> You are currently connected to the database: test
>
> test=> create table "TTT" ("III" int);
>
CREATE
> test=> insert into "TTT" values(100);
>
INSERT 143849 1
> test=> select * from "TTT";
> III
> ---
> 100
> (1 row)
>
> test=>
> [srapc451.sra.co.jp]t-ishii{274} pg_dump test
> CREATE TABLE ""TTT"" (""III"" int4);
> COPY "TTT" FROM stdin;
> 100
> \.
>
>
>

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-08-29 02:55:29 Re: AW: [HACKERS] sequence creation
Previous Message Bruce Momjian 1998-08-29 02:36:38 Re: [HACKERS] Minor bug: inconsistent handling of overlength names