From: Oliver Jowett <oliver@opencloud.com>
To: Michael Schmidt <michaelmschmidt@msn.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: pg_dump syntax
Date: Mon, 03 Apr 2006 10:19:00 +1200
Message-ID: <44304DD4.1000806@opencloud.com> (raw)
In-Reply-To: <BAY101-DAV8AC4BF1DF32B596360E74A3D40@phx.gbl>
References: <BAY101-DAV8AC4BF1DF32B596360E74A3D40@phx.gbl>
Michael Schmidt wrote:
> Folks,
> Sorry to be a bother, but I can't figure out how to do pg_dump of a
> database with jdbc. I've tried a variety of syntaxes to no avail and
> searched through the archives and the web with no help. Here is my last
> attempt
>
> SELECT pg_dump -Fc -f E:\backup\test.pgb npbase
>
> What am I doing wrong?
pg_dump is not a SQL command implemented by the DB backend. It is an
executable client program that connects to the DB backend itself and
runs various SQL queries to extract the database structure and data.
If you want to run pg_dump from Java, you need to be using
Runtime.exec() or similar.
You could also reimplement pg_dump's logic using JDBC, but I strongly
recommend you don't do that!
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, michaelmschmidt@msn.com
Subject: Re: pg_dump syntax
In-Reply-To: <44304DD4.1000806@opencloud.com>
References: <BAY101-DAV8AC4BF1DF32B596360E74A3D40@phx.gbl> <44304DD4.1000806@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox