Re: in query variables....

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Rhys A(dot)D(dot) Stewart" <rhys(dot)stewart(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: in query variables....
Date: 2008-07-17 20:48:49
Message-ID: 20080717204849.GO3934@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rhys A.D. Stewart escribió:

> Is there a way to get the name of the relation or relations in a query
> from within the query? Like some kind of magic variable...?
> for example :
> "select *, <some_magic_variable> from thistable"
> where <some_magic_variable> would be replaced by thistable.

select *, tableoid::regclass from thistable

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Klint Gore 2008-07-17 23:41:23 Re: query optimization
Previous Message Ismael .... 2008-07-17 20:30:53 Re: in query variables....