follow up Re: [HACKERS] SPI_connect always fails. - Mailing list pgsql-hackers

From Brett McCormick
Subject follow up Re: [HACKERS] SPI_connect always fails.
Date
Msg-id 13763.52996.279076.759103@web0.speakeasy.org
Whole thread Raw
In response to SPI_connect always fails.  (Brett McCormick <pgsql@chicken.org>)
List 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?
>

pgsql-hackers by date:

Previous
From: Brett McCormick
Date:
Subject: SPI_connect always fails.
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] 6.4 Aggregate Bug