Re: Need help in spi_prepare errors - Mailing list pgsql-general

From Tom Lane
Subject Re: Need help in spi_prepare errors
Date
Msg-id 8895.1254924973@sss.pgh.pa.us
Whole thread Raw
In response to Need help in spi_prepare errors  (paresh masani <masaniparesh@gmail.com>)
Responses Re: Need help in spi_prepare errors
List pgsql-general
paresh masani <masaniparesh@gmail.com> writes:
> Below function doesn't work: (I tried each combination mentioned with
> # but none of them working.)

I haven't tried it, but a look at the code makes me think that
spi_prepare wants each type name to appear as a separate argument.
It definitely won't work to smash them all into one string like that.

You're going to have the same problem at spi_exec_prepared --- it
thinks each actual value should be a separate argument.

I'm not much of a Perl hacker, but I seem to recall that it's possible
to pass an array to a function in a way that will make the array
elements look like separate arguments.  If you really need a dynamic
list of types and values, maybe there's some solution in that direction.

            regards, tom lane

pgsql-general by date:

Previous
From: mezgani ali
Date:
Subject: current_query stat is idle
Next
From: Tom Lane
Date:
Subject: Re: pg_dump with 1100 schemas being a bit slow