BUG #2204: Feature Req: Unique output column names - Mailing list pgsql-bugs

From Brandon Black
Subject BUG #2204: Feature Req: Unique output column names
Date
Msg-id 20060123173427.08006F0A2F@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #2204: Feature Req: Unique output column names
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2204
Logged by:          Brandon Black
Email address:      blblack@gmail.com
PostgreSQL version: All
Operating system:   All
Description:        Feature Req: Unique output column names
Details:

-------------Example------------

Welcome to psql 8.0.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

blah=# create table foo (x integer, y integer);
CREATE TABLE
blah=# select count(x), count(y) from foo;
 count | count
-------+-------
     0 |     0
(1 row)

--------------------------------------

Would it be reasonable or possible to have these default output column names
be something unique?  count_x and count_y, or "1", "2"?  Or even name them
literall "count(x)" and "count(y)".  As long as there were some reasonable
convention which doesn't cause conflicting duplicate names...

I realize this is fixable by the user with "AS count_x", this is more an
issue that came in writing cross-vendor ORM modules in perl, where most
other database vendors offer some sort of unique naming convention, but
postgres' output column names are indistinguishable, for the same query.

-- Brandon

pgsql-bugs by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: BUG #2188: win32 version of 8.1.2 is not getting installed
Next
From: "RIMBAUD Christophe"
Date:
Subject: BUG #2206: error on declare cursor after a close cursor