1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Improve generated column names for cases involving sub-SELECTs.

We'll now use "exists" for EXISTS(SELECT ...), "array" for ARRAY(SELECT
...), or the sub-select's own result column name for a simple expression
sub-select.  Previously, you usually got "?column?" in such cases.

Marti Raudsepp, reviewed by Kyotaro Horiugchi
This commit is contained in:
Tom Lane
2011-10-01 14:01:46 -04:00
parent 878b74e094
commit 5ec6b7f1b8
6 changed files with 59 additions and 16 deletions

View File

@ -2109,9 +2109,9 @@ SELECT ARRAY[]::integer[];
bracketed) subquery. For example:
<programlisting>
SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
?column?
-------------------------------------------------------------
{2011,1954,1948,1952,1951,1244,1950,2005,1949,1953,2006,31}
array
-----------------------------------------------------------------------
{2011,1954,1948,1952,1951,1244,1950,2005,1949,1953,2006,31,2412,2413}
(1 row)
</programlisting>
The subquery must return a single column. The resulting