Re: C Stored Function with ECPG - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: C Stored Function with ECPG
Date
Msg-id 29891.1235440048@sss.pgh.pa.us
Whole thread Raw
In response to C Stored Function with ECPG  (Bob Henkel <bob.henkel@gmail.com>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Bob Henkel
Date:
Subject: C Stored Function with ECPG
Next
From: Michael Meskes
Date:
Subject: Re: C Stored Function with ECPG