Re: Verbose output of pg_dump not show schema name

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Verbose output of pg_dump not show schema name
Дата
Msg-id 20140417153154.GD7443@momjian.us
обсуждение исходный текст
Ответ на Re: Verbose output of pg_dump not show schema name  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: Verbose output of pg_dump not show schema name  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Clock sweep not caching enough B-Tree leaf pages?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] pg_upgrade & tablespaces