Re: C Stored Function with ECPG

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob Henkel <bob(dot)henkel(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: C Stored Function with ECPG
Date: 2009-02-24 01:47:28
Message-ID: 29891.1235440048@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Bob Henkel <bob(dot)henkel(at)gmail(dot)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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Meskes 2009-02-25 15:54:29 Re: C Stored Function with ECPG
Previous Message Bob Henkel 2009-02-24 01:04:04 C Stored Function with ECPG