pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bob Henkel <bob.henkel@gmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: C Stored Function with ECPG
Date: Mon, 23 Feb 2009 20:47:28 -0500
Message-ID: <29891.1235440048@sss.pgh.pa.us> (raw)
In-Reply-To: <fedea56b0902231704w531b26a9hbba53dea7956eedf@mail.gmail.com>
References: <fedea56b0902231704w531b26a9hbba53dea7956eedf@mail.gmail.com>

Bob Henkel <bob.henkel@gmail.com> writes:
> I assume it's feasible to embedd ECPG in a Postgres Stored function
> written in C?

No, I don't think so; or at least that's not the expected usage.  ECPG
expects to connect to an external server.  The normal way to issue
SQL from C-level backend code is to use the SPI interface:
http://www.postgresql.org/docs/8.3/static/spi.html

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <29891.1235440048@sss.pgh.pa.us>
Permalink:  ../29891.1235440048@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29891.1235440048@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bob.henkel@gmail.com
  Subject: Re: C Stored Function with ECPG
  In-Reply-To: <29891.1235440048@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox