From: Tomasz Myrta <jasiek@klaster.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: pl/pgsql, cursors and C function
Date: Tue, 23 Sep 2003 18:43:12 +0200
Message-ID: <3F707820.1000100@klaster.net> (raw)
In-Reply-To: <16949.1064330109@sss.pgh.pa.us>
References: <3F70314C.30507@klaster.net>
<16949.1064330109@sss.pgh.pa.us>
>>I don't understand ERROR message at all:
>> ERROR: SPI_prepare() failed on "SELECT $1 "
>
>
> > This is a bug. Or two bugs, actually: one of yours and one of PG's.
> I have repaired the PG bug with the attached patch. The bug in your
> code is that your C function needs to call SPI_connect and SPI_finish
> if it's going to use any SPI operations.
>
> regards, tom lane
Thanks a lot. The first answer helped me, the second one - the others.
Do you know anything about good source of C functions documentation and
examples? Currently I'm walking over .h headers to find some useful
functions and macros.
Regads,
Tomasz Myrta
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-sql@postgresql.org
Cc: jasiek@klaster.net, tgl@sss.pgh.pa.us
Subject: Re: pl/pgsql, cursors and C function
In-Reply-To: <3F707820.1000100@klaster.net>
* 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