Обсуждение: Re : PG Admin on the command line = pg_dump

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

Re : PG Admin on the command line = pg_dump

От
Laurent ROCHE
Дата:
Hi,

I am puzzled why when I use pg_dump I get a script with INTEGER and SEQUENCE and when you (i.e. PG Admin) use pg_dump
youget a script with SERIAL ? 

Do you pass extra undocumented options to pg_dump ?
What version of pg_dump do you use in PG Admin III 1.6.1 ?
(I have used 8.1 and 8.2 with the same results)


Have fun,
L@u
The Computing Froggy

----- Message d'origine ----
De : Dave Page <dpage@postgresql.org>
À : Laurent ROCHE <laurent_roche@yahoo.com>
Cc : pgadmin-support@postgresql.org
Envoyé le : Mercredi, 27 Décembre 2006, 10h07mn 18s
Objet : Re: [pgadmin-support] PG Admin on the command line = pg_dump

Laurent ROCHE wrote:
> Hi,
>
> I would like to automate the generation of a backup script of a schema (which I used to perform with PG Admin backup
command).
> I looked into pg_dump command: it does the job BUT not correctly for me as it does not create SERIAL column but
INTEGERand then it creates SEQUENCES (I have scripts parsing the generated SQL file and looking for SERIAL columns). 
>
> I was wondering if it is possible to use command line switches to make the fantastic PG Admin III generate a script
(withoutany user interaction). 
> I could not see any thing in the doc about that, so I am asking you guys and gals.

pgAdmin just uses pg_dump to generate it's backup scripts, so we don't
have any command line options to this as we'd just say 'use pg_dump'.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
              http://archives.postgresql.org






___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com


Re: Re : PG Admin on the command line = pg_dump

От
Dave Page
Дата:
Laurent ROCHE wrote:
> Hi,
> 
> I am puzzled why when I use pg_dump I get a script with INTEGER and SEQUENCE and when you (i.e. PG Admin) use pg_dump
youget a script with SERIAL ?
 
> 
> Do you pass extra undocumented options to pg_dump ?
> What version of pg_dump do you use in PG Admin III 1.6.1 ?
> (I have used 8.1 and 8.2 with the same results)

8.2 with 1.6.1, and no, there are no undocumented features I'm aware of.

Mind you, if you're thinking of the SQL it displays in the main window, 
then that *is* generated by pgAdmin - it's the backup scripts that we 
use pg_dump for. It often does thinks in different ways from what you 
might expect to get round issues such as circular dependencies.

Regards, Dave.