[postgis-users] pl/python query variables
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue Sep 2 14:47:42 PDT 2008
Scott Fletcher wrote:
> Hello,
>
> I'm using pl/python with postgis 1.3.3. <http://1.3.3.>
>
> I'm using plpy.prepare to query my db and I'd like to be able to use
> values in my db tables to determine which table to query.
>
> I'd like to do something like this:
>
> plpy.prepare("select a.info <http://a.info> from $1 a where a.value=$2",
> ["text", "integer"])
>
> I've been using variables similar to the situation for $2 without any
> problems but I'm getting an error when I try a variable in place of the
> table name. My guess is that such variable use is not allowed. Is that
> correct? Or can someone make my day and explain to me how I can query
> with a yet to be determined table name?
>
> Thanks,
> -Scott
>
> PS If this is the wrong place to send such a question please let me
> know of a more appropriate group that may be able to help.
Hi Scott,
You'll probably get a suitable answer on the pgsql-general list over at
postgresql.org.
HTH,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-users
mailing list