how can I create the DML for an existing database - within an application

Started by Harald Armin Massaabout 20 years ago4 messagesgeneral
Jump to latest
#1Harald Armin Massa
haraldarminmassa@gmail.com

I want to get the output from

pg_dump --struct-only --table=whatever

inside a programm. Of course I could call pg_dump in a seperate process and
capture the output and all; but ...

as PGAdmin is doing it someway, I strongly suspect there is a kind of call
to recreate the DML language from a table in the database. Please give me a
hint!

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostgreSQL - supported by a community that does not put you on hold

#2Magnus Hagander
magnus@hagander.net
In reply to: Harald Armin Massa (#1)
Re: how can I create the DML for an existing database - within an application

I want to get the output from

pg_dump --struct-only --table=whatever

inside a programm. Of course I could call pg_dump in a
seperate process and capture the output and all; but ...

as PGAdmin is doing it someway, I strongly suspect there is a
kind of call to recreate the DML language from a table in the
database. Please give me a hint!

AFAIK, pgadmin opens a pipe to pg_dump.

//Magnus

#3Dave Page
dpage@pgadmin.org
In reply to: Magnus Hagander (#2)
Re: how can I create the DML for an existing database - within an application

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of
Magnus Hagander
Sent: 13 April 2006 08:40
To: Harald Armin Massa; pgsql-general
Subject: Re: [GENERAL] how can I create the DML for an
existing database - within an application

I want to get the output from

pg_dump --struct-only --table=whatever

inside a programm. Of course I could call pg_dump in a seperate
process and capture the output and all; but ...

as PGAdmin is doing it someway, I strongly suspect there is

a kind of

call to recreate the DML language from a table in the

database. Please

give me a hint!

AFAIK, pgadmin opens a pipe to pg_dump.

Yes, when creating an actual backup. To display the definition on the
main window it goes to great pains to reverse engineer the SQL from the
catalogues.

Regards, Dave

#4Dave Page
dpage@pgadmin.org
In reply to: Dave Page (#3)
Re: how can I create the DML for an existing database - within an application

________________________________

From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 13 April 2006 09:37
To: Dave Page
Subject: Re: [GENERAL] how can I create the DML for an existing
database - within an application

Dave,

AFAIK, pgadmin opens a pipe to pg_dump.

Yes, when creating an actual backup. To display the
definition on the
main window it goes to great pains to reverse engineer
the SQL from the
catalogues.

do you think it is possible to "isolate that pain" within the
source and expose it as a module? Or do you think this would be way to
difficult?

That would require significant restructuring of pgAdmin's code, in a way
that would not make it more usable within pgAdmin. It's not something we
would consider doing.

Regards, Dave.