Re: Accessing libq functions from UDF (shared library)

From: Richard Huxton <dev(at)archonet(dot)com>
To: Gayathri TK <gtambar(at)ncsu(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Accessing libq functions from UDF (shared library)
Date: 2005-11-09 07:35:15
Message-ID: 4371A6B3.6020603@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2005-11-09 07:54:12 Re: SIGSEGV taken on 8.1 during dump/reload
Previous Message Teodor Sigaev 2005-11-09 07:27:53 Re: SIGSEGV taken on 8.1 during dump/reload