Tablenames in Resultsets?

From: gb(at)a3design(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: Tablenames in Resultsets?
Date: 2000-09-27 06:57:08
Message-ID: Pine.LNX.4.21.0009270852050.356-100000@firebird.mipz.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello there!

how do I get the tablenames in an resultset from an query like this:

imagine two tables with columns named id and value

test1:
id | value
------------
1 | hello
2 | goodbye

test2:
id | value
------------
1 | gunter
2 | heinz

select * from test1, test2 where test1.id=test2.id

the problem is:

my resultset looks like this:

id | value | id | value
------------------------
...

but I need:

test1.id | test1.value | test2.id | test2.value
-----------------------------------------------
...

because I dont want to access the fields by index but by name!!!

any suggestions?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message admin 2000-09-27 07:05:16 Re: Int8 problem
Previous Message Tom Lane 2000-09-27 06:43:22 Re: Int8 problem