pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Shiels <philip.shiels@jrc.it>
To: pgsql-hackers@postgresql.org
To: pgsql-interfaces@postgresql.org
Subject: Tables names from query
Date: Mon, 22 Feb 1999 11:36:59 +0100
Message-ID: <36D1334B.D61D9B3A@jrc.it> (raw)

I'm currently developing a postgres DB backend to my current project and have
the following problem. If I execute a query I need to know the table the
returning fields belong to. For example :

SELECT x.y, z.y from x, y where x.key = z.key

The problem with the above is that I get back 2 fields called 'y' and have no
way of knowing from which tables they've come from. The query is arbitrary so I
cannot assume table order in the SQL statement.

What information from the 'C' or 'C++' APIs can help ?

Is there is a way of identifying the originating tables ?

Thanks
        Philip  
--------------------------------------------------------------------------
Philip Shiels     E-Mail:Philip.Shiels@jrc.it      JRC Ispra, Italy, TP270
GIST:http://gist.jrc.it CEO:http://www.ceo.org GEM:http://gem.jrc.it



view thread (6+ messages)  latest in thread

Message-ID: <36D1334B.D61D9B3A@jrc.it>
Permalink:  ../36D1334B.D61D9B3A@jrc.it/
Also on:    postgresql.org/message-id/36D1334B.D61D9B3A@jrc.it

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: philip.shiels@jrc.it, pgsql-hackers@postgresql.org
  Subject: Re: Tables names from query
  In-Reply-To: <36D1334B.D61D9B3A@jrc.it>

* 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