Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd70a944

Browse files
committed
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 1test=# 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
1 parentbe18a49 commitd70a944

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/parser/parse_target.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.70 2001/08/09 18:28:18 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.71 2001/09/10 14:53:10 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -462,7 +462,10 @@ FigureColname(Node *expr, Node *resval)
462462
/* Some of these are easiest to do with the untransformed node */
463463
switch (nodeTag(resval))
464464
{
465-
caseT_Ident:
465+
caseT_TypeCast:
466+
return( ( ((Ident*) ((TypeCast*)resval)->arg)->name));
467+
468+
caseT_Ident:
466469
return ((Ident*)resval)->name;
467470
caseT_Attr:
468471
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp