From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | paresh masani <masaniparesh(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Need help in spi_prepare errors |
Date: | 2009-10-07 14:24:34 |
Message-ID: | 20091007142434.GC7719@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane escribió:
> 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.
Actually any time you pass an array as a parameter, the list is
flattened and the function sees it as a plain list. If that doesn't
seem to make sense, consider that if you pass two lists they will be
flattened to a single list and you won't be able to tell where one
ends and the other starts.
If you really want two separate lists, you need to pass them as array
references (i.e. \(at)myarray). I guess you could also pass an element
count but that's not very perlish.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Kynn Jones | 2009-10-07 14:57:41 | How to troubleshoot authentication failure? |
Previous Message | Tom Lane | 2009-10-07 14:23:48 | Re: pg_dump with 1100 schemas being a bit slow |