Re: cursors and column names - Mailing list pgsql-general

From Richard Huxton
Subject Re: cursors and column names
Date
Msg-id 200302211101.56122.dev@archonet.com
Whole thread Raw
In response to cursors and column names  (John DeSoi <jdesoi@planetc.com>)
List pgsql-general
On Friday 21 Feb 2003 4:01 am, John DeSoi wrote:
> If a cursor selects from multiple tables is there any way to
> distinguish columns from two tables that have the same name? The
> column information returned does not appear to have any information
> to associate a column with a table.

Something very similar came up just the other day. Alias the table names, and
then you can pick them out.

SELECT f.x,f.y,b.x,b.y FROM foo f, bar b;

--
  Richard Huxton

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: max connections
Next
From: Jean-Christian Imbeault
Date:
Subject: type casting a subselect as an interval