follow up Re: [HACKERS] SPI_connect always fails.

From: Brett McCormick <pgsql(at)chicken(dot)org>
To: pgsql-hackers(at)hub(dot)org
Subject: follow up Re: [HACKERS] SPI_connect always fails.
Date: 1998-08-02 02:29:24
Message-ID: 13763.52996.279076.759103@web0.speakeasy.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


As usual I failed to do sufficient testing before posting, and it
appears as thought the fact that my function is taking a composite
type as an argument is causing SPI_connect to fail.

I performed the following test:

int4 spitest(TUPLE *t) {
int ret;
if ((ret = SPI_connect()) < 0)
elog(ERROR, "SPI_connect returned %d", ret);
return 1;
}

if the function is created with a composite type argument (i.e. a
table) it fails. if the same function, same code is created with
either no arguments or an int4 argument it succeeds. I don't really
know enough about SPI or the passing of composite types to determine
why this is, and unfortunately I don't have the time right now to
learn. It does seem to be an issue. Can this go on the TODO list? I
can of course work around this for the time being.

Also, what is the tentative release date for 6.4, so I can be
prepared? I'm hoping to have time for PL/perl.

On Sat, 1 August 1998, at 19:18:04, Brett McCormick wrote:

> I'm attempting to use SPI because it seems I can't call a function
> with a view as the argument, and the information is in multiple
> tables. But every time I call SPI_connect, it fails. I compiled the
> backend with debugging information, but it isn't very clear what is
> happening. is there any documentation for SPI beyond the shtml file
> in the doc directory, or tips for using it?
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-08-02 04:21:05 Re: [HACKERS] 6.4 Aggregate Bug
Previous Message Brett McCormick 1998-08-02 02:18:04 SPI_connect always fails.