pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Swan <tswan@olemiss.edu>
To: pgsql-sql@postgresql.org
Subject: Altnerate Column Return Names
Date: Fri, 07 Jul 2000 08:46:52 -0500
Message-ID: <4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu> (raw)


If I do a select * from table1, table2 where table1.id = table2.id I 
normally get two columns returned with a column identifier of id.

Such as

  id | name | data | id | name | data
----+------+------+----+------+------
     |      |      |    |      |

Is there anyway to get the result to return

  table1.id | table1.name | table1.data | table2.id | ,,,
-----------+-------------+-------------+-----------+- ...

It seems awkward, however the only way I've been able to work around this 
is to use column names prefixed with the table name.

One of my projects is using PHP and I"m sure that the hash table they 
create to select rows is determined from the column names returned from a 
query.

Thanks,
Thomas


... I feel like I ask some weird questions ...
-
- Thomas Swan
- ________________________________________
- Graduate Student  - Computer Science
- The University of Mississippi
-
- "People can be sorted into two fundamental groups,
- those that divide people into two groups and
- those that don't."




view thread (2+ messages)  latest in thread

Message-ID: <4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu>
Permalink:  ../4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu/
Also on:    postgresql.org/message-id/4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tswan@olemiss.edu
  Subject: Re: Altnerate Column Return Names
  In-Reply-To: <4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu>
  References: <4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu>

* 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