possible pg_dump bug

Поиск
Список
Период
Сортировка
Искать

possible pg_dump bug

От:
David Miller <miller392@yahoo.com>
Дата:
Pg Dump does not include schema name on insert statement generated from pg_dump with a -d option when exporting data for a particular table using the -t . in version 8.3. I believe this same bug exists in 8.4 but have not confirmed it. I believe pg_dump should have an option to retain schema information.

David Miller
River Systems, Inc.

Re: possible pg_dump bug

От:
Raymond O'Donnell <rod@iol.ie>
Дата:
On 28/01/2009 17:09, David Miller wrote:
> Pg Dump does not include schema name on insert statement generated
> from pg_dump with a -d option when exporting data for a particular
> table using the -t . in version 8.3. I believe this
> same bug exists in 8.4 but have not confirmed it. I believe pg_dump
> should have an option to retain schema information.

From memory, I think it does include a "set search_path" statement near
the beginning.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

Re: possible pg_dump bug

От:
Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>
Дата:
On Wed, 2009-01-28 at 09:09 -0800, David Miller wrote:
> Pg Dump does not include schema name on insert statement generated from pg_dump with a -d option when exporting data for a particular table using the -t . in version 8.3. I believe this same bug exists in 8.4 but have not confirmed it. I believe pg_dump should have an option to retain schema information.
> 

would the option --clean solve this problem ?

pg_dump --clean

> David Miller
> River Systems, Inc.
> 
> 

Re: possible pg_dump bug

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Raymond O'Donnell"  writes:
> On 28/01/2009 17:09, David Miller wrote:
>> Pg Dump does not include schema name on insert statement generated
>> from pg_dump with a -d option when exporting data for a particular
>> table using the -t . in version 8.3. I believe this
>> same bug exists in 8.4 but have not confirmed it. I believe pg_dump
>> should have an option to retain schema information.

> From memory, I think it does include a "set search_path" statement near
> the beginning.

Quite.  There is no bug here unless loading the dump file puts something
in the wrong schema.  (Suppressing the schema name where possible is in
fact considered a feature not a bug, since it makes it simpler to
hand-edit the dump file at need.)

			regards, tom lane

Re: possible pg_dump bug

От:
Asko Oja <ascoja@gmail.com>
Дата:
Hi

For the record. Using search_path for schema name handling is most annoying feature of pg_dump for us. I have run into many cases where separating schema is inconvenient but don't seem to remember any upsides.

regards
Asko

On Wed, Jan 28, 2009 at 7:39 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Raymond O'Donnell" <rod@iol.ie> writes:
> On 28/01/2009 17:09, David Miller wrote:
>> Pg Dump does not include schema name on insert statement generated
>> from pg_dump with a -d option when exporting data for a particular
>> table using the -t <schema>.<table> in version 8.3. I believe this
>> same bug exists in 8.4 but have not confirmed it. I believe pg_dump
>> should have an option to retain schema information.

> From memory, I think it does include a "set search_path" statement near
> the beginning.

Quite.  There is no bug here unless loading the dump file puts something
in the wrong schema.  (Suppressing the schema name where possible is in
fact considered a feature not a bug, since it makes it simpler to
hand-edit the dump file at need.)

                       regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: possible pg_dump bug

От:
Joao Ferreira <jmcferreira@critical-links.com>
Дата:
On Wed, 2009-01-28 at 09:09 -0800, David Miller wrote:
> Pg Dump does not include schema name on insert statement generated from pg_dump with a -d option when exporting data for a particular table using the -t . in version 8.3. I believe this same bug exists in 8.4 but have not confirmed it. I believe pg_dump should have an option to retain schema information.
> 

would --clean solve the problem ?

Joao


> David Miller
> River Systems, Inc.
> 
> 

FAQ