Selecting from a dynamic name

From: "Jason Kwok" <pg(at)newhonest(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Selecting from a dynamic name
Date: 2001-11-30 02:43:26
Message-ID: 001001c17948$c916b7c0$0201a8c0@newhonest.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have asked this question before, but still I'm stuck.
How can I select from a table with a name that's returned by a function?

eg : I have a function named tablename() which return 'mytable'
If I already have a table called mytable, can I :

select * from tablename();

pgadmin2 returns an error :
ERROR : parser : parse error at or near "("

==
====
Best Regards
Jason Kwok
==============
====

---
Virus Free
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.303 / Virus Database: 164 - Release Date: 2001/11/24

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2001-11-30 03:37:28 Re: Selecting from a dynamic name
Previous Message Roberto Mello 2001-11-30 02:05:25 Re: Check for table existence