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

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: michael(dot)paquier(at)gmail(dot)com
Cc: sfrost(at)snowman(dot)net, andrew(at)dunslane(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, pavel(at)gf(dot)microolap(dot)com, pavel(at)microolap(dot)com, shuai900217(at)126(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GSOC] questions about idea "rewrite pg_dump as library"
Date: 2013-04-12 00:29:22
Message-ID: 20130412.092922.406073591352453323.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> > Well, either they want that or they want that output more
>> > accessibly, and without all the baggage that pg_dump necessarily
>> > brings to the table. pg_dump does a lot of stuff that's basically
>> > designed for bulk operations, and often what people want is a way to
>> > get, say, the creation DDL for some object, without any locks than
>> > the usual locks any transaction takes.
>>
>> Yes- being able to get that from a simple database function would be
>> very nice. I wonder if some of what's been done with the "event"
>> triggers would inform us about what that API should look like.
>>
> I recall discussions about reverse engineering of a parsed query tree in
> the event trigger threads but nothing has been committed I think. Also, you
> need to consider that implementing such reverse engineering mechanism in
> core might not be a good thing for new features and maintenance, as it
> would mean that it is necessary to change those APIs consistently with what
> is added on the parsing side.
> It could make more sense to have such a set of functions created as a
> separate project.

This may or may not related to, but...

pgpool-II already does "reverse engineering" from a parsed query. It
parses a query, genetrates raw parse tree, rewrites it for certain
purpose and generates text query. If you are interested, you could
take a look at pgpool-II source code.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-04-12 01:15:49 Re: [ADMIN] after 9.2.4 patch vacuumdb -avz not analyzing all tables
Previous Message Michael Paquier 2013-04-12 00:17:07 Re: [GSOC] questions about idea "rewrite pg_dump as library"