Re: Any tutorial or FAQ on building an extension?

From: Matt Culbreth <mattculbreth(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Any tutorial or FAQ on building an extension?
Date: 2009-08-11 17:34:36
Message-ID: f70c7783-d1e9-4cb5-ba48-c2b2cbe9c1bb@w6g2000yqw.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Aug 11, 1:11 pm, j(dot)(dot)(dot)(at)agliodbs(dot)com (Josh Berkus) wrote:
> > Is there an easier way of going about this other than replacing the
> > postmaster / postgres components?
>
> I'd start with creating my own extended version to psql (the client
> library), I suppose.  But since I don't really know what kind of
> "transformations" you have in mind, any advice is going to be purely
> speculative.
>

Thanks for the response Josh.

I'm not sure that psql is the right thing for me to do though, since I
want to build a back-end component that takes the place of the
existing postmaster. Very possible I misunderstood you though.

To clarify, essentially what I want to do is this:

Client [ psql | JDBC driver | pgAdmin | etc. ] issues a Query
[ "Select * from sales" ]
|
|
\/
My new component intercepts this, and decides if it wants to do
something
|
|
\/
If it does not, it simply passes this on to the real PostgreSQL server
running somewhere
|
|
\/
If it does, it passes the request over to my new server (via sockets),
does its work, and pass back the results
|
|
\/
The client gets the results back, either from PostgreSQL or from my
new server, and goes about its way.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-11 17:42:08 Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Previous Message Robert Haas 2009-08-11 17:14:56 Re: "Hot standby"?