Dumping from older version

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

Dumping from older version

От:
Raymond O'Donnell <rod@iol.ie>
Дата:
Just wondering - when using a newer pg_dump to dump from an older 
Postgres, does pg_dump automatically generate INSERT statements for the 
data rather than using COPY?

I noticed this today when transferring data to a newer server - pg_dump 
generated INSERTs although I didn't ask for them. Not a problem, but I 
was curious.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

Re: Dumping from older version

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Raymond O'Donnell wrote:
> Just wondering - when using a newer pg_dump to dump from an older Postgres, 
> does pg_dump automatically generate INSERT statements for the data rather 
> than using COPY?

No.

> I noticed this today when transferring data to a newer server - pg_dump 
> generated INSERTs although I didn't ask for them. Not a problem, but I was 
> curious.

Perhaps you included -d in the command line options?

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)

Re: Dumping from older version

От:
Carlos Moreno <moreno_pg@mochima.com>
Дата:
Raymond O'Donnell wrote:
> Just wondering - when using a newer pg_dump to dump from an older 
> Postgres, does pg_dump automatically generate INSERT statements for 
> the data rather than using COPY?
>
> I noticed this today when transferring data to a newer server - 
> pg_dump generated INSERTs although I didn't ask for them. Not a 
> problem, but I was curious.

Maybe you used the switch -d to specify the database?  (like with psql 
and some
other client applications).

The switch -d in pg_dump goes for "Generate inserts instead of COPY 
commands"

Double-check the syntax/switches for pg_dump  (pg_dump --help)

HTH,

Carlos
--

Re: Dumping from older version

От:
Raymond O'Donnell <rod@iol.ie>
Дата:
On 26/09/2007 16:26, Carlos Moreno wrote:

> Maybe you used the switch -d to specify the database?  (like with psql 
> and some other client applications).

Duhhh! I've just realised my mistake - here's my command line:

pg_dump -h 192.168.200.2 -U postgres -d assetreg -f assetreg.txt -E utf8

....I had thought that the -d option was to specify the database, but of 
course not.

Thanks all - I'm sadder and wiser!

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------
FAQ