Using a variable as tablename ins plpgsql?

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Using a variable as tablename ins plpgsql?
Date: 2008-10-20 16:45:04
Message-ID: 600119.19604.qm@web23605.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2008-10-20 16:51:33 Re: Using a variable as tablename ins plpgsql?
Previous Message Teodor Sigaev 2008-10-20 15:42:30 Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4