Re: cursors and column names

From: Richard Huxton <dev(at)archonet(dot)com>
To: John DeSoi <jdesoi(at)planetc(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: cursors and column names
Date: 2003-02-21 11:01:56
Message-ID: 200302211101.56122.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak 2003-02-21 11:17:08 Re: type casting a subselect as an interval
Previous Message Jean-Christian Imbeault 2003-02-21 10:59:19 type casting a subselect as an interval