Re: pl/pgsql, cursors and C function

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lista dyskusyjna pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: pl/pgsql, cursors and C function
Date: 2003-09-23 16:43:12
Message-ID: 3F707820.1000100@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>>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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message scott.marlowe 2003-09-23 16:54:45 Re: Using sql statements in file
Previous Message Jeff Kowalczyk 2003-09-23 16:15:53 updating a field with a SUM from another table