Re: [HACKERS] [PATCH] Generate column names for subquery expressions

2011-09-06 Thread Marti Raudsepp
Here's version 2 of the patch, mainly to silence compiler warnings about missing "case" statements from a switch over SubLinkType enum. Also expanded commit message a little and changed whitespace to be more consistent with nearby code. Regards, Marti From 9f987efacfe2cd2af82722775127605e690df976

Re: [HACKERS] [PATCH] Generate column names for subquery expressions

2011-08-31 Thread Tom Lane
Marti Raudsepp writes: > In current PostgreSQL versions, subquery expressions in the SELECT list > always generate columns with name "?column?" > ... > This patch improves on that: > select (SELECT 1 AS foo) => foo > select exists(SELECT 1) => exists > select array(SELECT 1) => array > D

[HACKERS] [PATCH] Generate column names for subquery expressions

2011-08-31 Thread Marti Raudsepp
Hi list, In current PostgreSQL versions, subquery expressions in the SELECT list always generate columns with name "?column?" postgres=# select (select 1 as foo); ?column? 1 This patch improves on that: select (SELECT 1 AS foo) => foo select exists(SELECT 1) => exists sele