From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | paresh masani <masaniparesh(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Need help in spi_prepare errors |
Date: | 2009-10-07 14:16:13 |
Message-ID: | 8895.1254924973@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
paresh masani <masaniparesh(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-07 14:23:48 | Re: pg_dump with 1100 schemas being a bit slow |
Previous Message | mezgani ali | 2009-10-07 11:47:40 | current_query stat is idle |