Thread: SPI_connect always fails.

SPI_connect always fails.

From
Brett McCormick
Date:
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?

follow up Re: [HACKERS] SPI_connect always fails.

From
Brett McCormick
Date:
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?
>

Re: follow up Re: [HACKERS] SPI_connect always fails.

From
"Thomas G. Lockhart"
Date:
> Also, what is the tentative release date for 6.4, so I can be
> prepared?  I'm hoping to have time for PL/perl.

Scrappy mentioned the other day that we are on a September 1
freeze/October 1 release schedule for now. Not likely to get moved up to
earlier since that is only a month away now...

                    - Tom