Re: execute table query in backend

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Anh Pham <atpham(dot)wpi(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: execute table query in backend
Date: 2014-03-06 05:36:14
Message-ID: CA+HiwqGArTONNSxgoXSVppiH7=X+n68_itg8FJ0tZjm=S3Fy0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 4, 2014 at 12:38 AM, Anh Pham <atpham(dot)wpi(at)gmail(dot)com> wrote:
> Hi,
> I am trying to extend the server backend by writing a new module.
> Basically, it tries to retrieve tuples from a specific table using some
> predefined qualifications (equivalent to "SELECT FROM WHERE" client sql
> statement ).
> Is there any quick or efficient way to do this?

Assuming you're trying to write a server extension (and NOT a client
application), this is where you can start:

http://www.postgresql.org/docs/9.3/static/server-programming.html

Specifically, an interface called "server programming interface"
(chapter 44 on the above page) can be used to issue SQLs from a server
extension module. Read more about it here (documentation also includes
few examples to get started with):

http://www.postgresql.org/docs/9.3/static/spi.html

--
Amit

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jarosław Błąd 2014-03-06 12:24:51 DB GUI design tool?
Previous Message Adrian Klaver 2014-03-05 22:00:00 Re: Mysterious DB reset