Received: from mrelay.jrc.it (mrelay.jrc.it [139.191.1.65]) by hub.org (8.9.2/8.9.1) with ESMTP id GAA25210 for ; Mon, 22 Feb 1999 06:25:19 -0500 (EST) (envelope-from philip.shiels@jrc.it) Received: from elec.isei.jrc.it (elec.jrc.it [139.191.71.132]) by mrelay.jrc.it (LMC5692) with SMTP id MAA29851 for ; Mon, 22 Feb 1999 12:27:37 +0100 (MET) Received: from jrc.it (elpc52) by elec.isei.jrc.it (4.1/EI-3.0m) id AA14751; Mon, 22 Feb 99 12:26:05 +0100 Posted-Date: Mon, 22 Feb 1999 14:26:37 +0100 Sender: phs@jrc.it Message-Id: <36D15B0D.B57DB69C@jrc.it> Date: Mon, 22 Feb 1999 14:26:37 +0100 From: Philip Shiels Reply-To: philip.shiels@jrc.it X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en Mime-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Tables names from query Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit 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 (Icannot assume anything about the query except that it's a SELECT). 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