Re: Accessing libq functions from UDF (shared library) - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: Accessing libq functions from UDF (shared library)
Date
Msg-id 4371A6B3.6020603@archonet.com
Whole thread Raw
In response to Accessing libq functions from UDF (shared library)  (Gayathri TK <gtambar@ncsu.edu>)
List pgsql-hackers
Gayathri TK wrote:
> Hi all,
> 
> I am trying to create a User-defined function(UDF) which takes filename 
> as input.. the function reads the file containig sql queries and 
> executes them in background using libq functions (PGconnectDb, PQexec 
> etc..).

> But when i tried creating a UDF using 'CREATE OR REPLACE FUNCTION' , i 
> get the following error:

Should you not be using SPI to run queries if this is inside PostgreSQL? 
See chapter 39 "Server Programming Interface" for details.

--   Richard Huxton  Archonet Ltd


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: SIGSEGV taken on 8.1 during dump/reload
Next
From: Teodor Sigaev
Date:
Subject: Re: SIGSEGV taken on 8.1 during dump/reload