Bug #1: attribute name when column is type cast:
authorBruce Momjian <bruce@momjian.us>
Mon, 10 Sep 2001 14:53:10 +0000 (14:53 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 10 Sep 2001 14:53:10 +0000 (14:53 +0000)
commitd70a944e0a54a08586ec8296d9abaf7cb52a9db2
treeae9484a2a0fffaf57546f87fc01f4006316052d3
parentbe18a49d394d106aa1a06d1d8da59327e85be107
Bug #1: attribute name when column is type cast:

Given the following table:

test=# \d f
          Table "f"
 Column |  Type   | Modifiers
--------+---------+-----------
 i      | integer |
 test   | text    |

If I do the following:

test=# insert into f values(1,'test');
INSERT 139549 1
test=# select i::int8,test from f;
 ?column? | test
----------+------
        1 | test
(1 row)

It doesn't make much sense that the first column should be called
'?column?'.

The patch results in the output appearing like this:

test=# select i::int8,test from f;
 i | test
---+------
 1 | test
(1 row)

----------

Gavin Sherry
src/backend/parser/parse_target.c