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

Commitbc20c41

Browse files
author
Thomas G. Lockhart
committed
Fix bug in recent improvement to type resolution code. Forgot to retain
"best choice" type category when resolving UNKNOWN function and operator arguments. Thanks to Tom Lane for finding test case.
1 parenta8555ad commitbc20c41

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎src/backend/parser/parse_func.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.92 2000/11/06 15:42:30 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.93 2000/11/11 19:49:26 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -951,6 +951,8 @@ func_select_candidate(int nargs,
951951
/* started out as unknown type, so give preference to string type, if available */
952952
if (current_category==STRING_TYPE)
953953
{
954+
slot_category=current_category;
955+
slot_type=current_type;
954956
/* forget all previous candidates */
955957
candidates=current_candidate;
956958
last_candidate=current_candidate;

‎src/backend/parser/parse_oper.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.42 2000/11/07 16:01:01 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.43 2000/11/11 19:49:26 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -435,6 +435,7 @@ oper_select_candidate(int nargs,
435435
current_typeids=current_candidate->args;
436436
current_type=current_typeids[i];
437437
current_category=TypeCategory(current_type);
438+
/* first time through? Then we'll use this one for now */
438439
if (slot_category==INVALID_TYPE)
439440
{
440441
slot_category=current_category;
@@ -446,6 +447,8 @@ oper_select_candidate(int nargs,
446447
/* started out as unknown type, so give preference to string type, if available */
447448
if (current_category==STRING_TYPE)
448449
{
450+
slot_category=current_category;
451+
slot_type=current_type;
449452
/* forget all previous candidates */
450453
candidates=current_candidate;
451454
last_candidate=current_candidate;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp