Thread: Using a variable as tablename ins plpgsql?
Hi people, Hopefully this is a quickie, I want to pass in a table name to a plpgsql function and then use that table name in my queries. Is EXECUTE the only way to do this? Ta Glyn Send instant messages to your online friends http://uk.messenger.yahoo.com
Hello 2008/10/20 Glyn Astill <glynastill@yahoo.co.uk>: > Hi people, > > Hopefully this is a quickie, I want to pass in a table name to a plpgsql function and then use that table name in my queries. > > Is EXECUTE the only way to do this? > > Ta > Glyn > yes, regards Pavel Stehule > > > > > > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >
2008/10/20 Glyn Astill <glynastill@yahoo.co.uk>
As far as I know, yes. That's the only way to create queries using dynamic table and column names.
Hi people,
Hopefully this is a quickie, I want to pass in a table name to a plpgsql function and then use that table name in my queries.
Is EXECUTE the only way to do this?