[postgis-users] pl/python query variables

Scott Fletcher sfletche at gmail.com
Thu Aug 28 12:53:27 PDT 2008


I'm using pl/python with postgis 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 from $1 a where a.value=$2", ["text",

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?


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080828/26d439e7/attachment.html>

More information about the postgis-users mailing list