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