| From: | dgroth(at)gmx(dot)de | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | tablename.columnname notation for columnnames of joined tables | 
| Date: | 2005-11-04 14:29:24 | 
| Message-ID: | 1131114564.027506.88430@g47g2000cwa.googlegroups.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hello,
I know it is possible in other dbs like sqlite.
Let's say I have two tables which I want to join owners (name,age) and
dogs (name,owner,age).
select * from owners as a join dogs as b on a.name = b.owner
How could I convince postgres to prefix the returned  columnnames with
the tablename like owners.name, dogs.name etc.
I need this for a python and tcl interface and if only name is
retrieved as columnname, then the last value is assigned to the
hash/dictionary entry "age". So the owner gets the age of his dog :(
and even its name :(( . Hoe you get the point
I know that I can use fully qualified columnames instead of "select *"
but this is very annoying if you have many columns and you nest your
statements.
Is there a solution ?
regards, Detlef
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Douglas McNaught | 2005-11-04 14:37:32 | Re: Image File System Question | 
| Previous Message | vishal saberwal | 2005-11-04 14:24:06 | Re: Image File System Question |