Re: [GSOC] questions about idea "rewrite pg_dump as library"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, Pavel Golub <pavel(at)microolap(dot)com>
Cc: 帅 <shuai900217(at)126(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GSOC] questions about idea "rewrite pg_dump as library"
Date: 2013-04-11 13:51:14
Message-ID: 818.1365688274@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Golub <pavel(at)microolap(dot)com> writes:
> From my point of view the new library should export only two
> functions:

> 1. The execution function:

> ExecStatusType PGdumpdbParams(const char * const *keywords,
> const char * const *values);

No, this is exactly *wrong*. You might as well not bother to refactor,
if the only API the library presents is exactly equivalent to what you
could get with system("pg_dump ...").

I don't know what the right answer is, but this isn't it. Most people
who are interested in this topic are interested because they want to get
output that is different from anything pg_dump would produce on its own,
for instance applying a more complex object-selection rule than anything
pg_dump offers. Right now, the only way they can do that is lobby to
add new switch options to pg_dump. With a change like this, it'd still
be the case that they can't get what they want except by adding new
switch options to pg_dump. I don't see any advantage gained.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-04-11 13:52:47 Re: Inconsistent DB data in Streaming Replication
Previous Message Hannu Krosing 2013-04-11 13:25:35 Re: Inconsistent DB data in Streaming Replication