Re: pg_dump of only the structure from a client such as ruby

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Perry Smith <pedz(at)easesoftware(dot)com>
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump of only the structure from a client such as ruby
Date: 2007-08-06 00:37:41
Message-ID: 27857.1186360661@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Perry Smith <pedz(at)easesoftware(dot)com> writes:
> I find it odd that you are resistant to the idea. To me, the
> advantages are clear if it can be done without a tremendous amount of
> work.

Well, it can't. pg_dump is an enormously complicated and frequently
changed bit of code, and so you really really don't want to be copying
it into other clients.

For a long time there's been occasional talk of refactoring pg_dump into
a library and wrapper program such that the library could be used by
other clients. But that would be a large amount of work in itself,
especially if you hoped to design a library API that was rich enough
that it'd be meaningfully more flexible than pg_dump itself is. Aside
from the sheer work involved, there's the danger of introducing bugs
into what is certainly a critical part of our infrastructure. So it's
never gotten further than "wouldn't it be nice" discussions.

regards, tom lane

PS: *please* see if you can get them to take out the usage of pg_dump's
-i switch. Having code invoke that blindly borders on criminal
negligence.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message novnov 2007-08-06 00:54:53 Re: Postgres 8.2 binary for ubuntu 6.10?
Previous Message Perry Smith 2007-08-05 23:58:33 Re: pg_dump of only the structure from a client such as ruby