Re: Verbose output of pg_dump not show schema name - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Verbose output of pg_dump not show schema name
Date
Msg-id 20140417153154.GD7443@momjian.us
Whole thread Raw
In response to Re: Verbose output of pg_dump not show schema name  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Verbose output of pg_dump not show schema name
List pgsql-hackers
On Thu, Apr 17, 2014 at 12:07:39PM -0300, Fabrízio de Royes Mello wrote:
> > Can you get that to _conditionally_ double-quote the strings? 
> 
> Sorry, I didn't understand what you means? Your idea is to check if the
> namespace is available and then don't show the double-quote, is that?

The idea is that we only need quotes when there are odd characters in
the identifier.  We do that right now in some places, though I can't
find them in pg_dump.  I know psql does that, see quote_ident().

> > In fact,
> > maybe we don't even need the double-quotes.  How do we double-quote
> > other places?
> >
> 
> Checking that more deeply I found some other places that show the table name
> and all of them are double-quoted.

OK.

> Just the "dumping contents of table.." message isn't double-quoted:
> 
> $ grep 'table %s' src/bin/pg_dump/*.c
> src/bin/pg_dump/pg_dump.c:            write_msg(NULL, "dumping contents of
> table %s\n",
> 
> 
> So maybe we must double-quote of all string, i.e. "public.foo", including the
> missing bellow.

No, I think double-quoting each part is the correct way.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Clock sweep not caching enough B-Tree leaf pages?
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] pg_upgrade & tablespaces