pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Kwok <pg@newhonest.com>
To: pgsql-sql@postgresql.org
Subject: Selecting from a dynamic name
Date: Fri, 30 Nov 2001 10:43:26 +0800
Message-ID: <001001c17948$c916b7c0$0201a8c0@newhonest.com> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <001001c17948$c916b7c0$0201a8c0@newhonest.com>
Permalink:  ../001001c17948$c916b7c0$0201a8c0@newhonest.com/
Also on:    postgresql.org/message-id/001001c17948$c916b7c0$0201a8c0@newhonest.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg@newhonest.com
  Subject: Re: Selecting from a dynamic name
  In-Reply-To: <001001c17948$c916b7c0$0201a8c0@newhonest.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox