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

Commite6e893e

Browse files
author
Thomas G. Lockhart
committed
Enable fallback to string type when argument(s) are of UNKNOWN type.
Same code exactly as for function resolution. An obvious example is for select '1' = '01'; which used to throw an error and which now resolves to two text strings.
1 parent3af2827 commite6e893e

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

‎src/backend/parser/parse_oper.c

Lines changed: 16 additions & 3 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_oper.c,v 1.41 2000/05/28 17:56:00 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.42 2000/11/07 16:01:01 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -443,8 +443,21 @@ oper_select_candidate(int nargs,
443443
}
444444
elseif (current_category!=slot_category)
445445
{
446-
/* punt if more than one category for this slot */
447-
returnNULL;
446+
/* started out as unknown type, so give preference to string type, if available */
447+
if (current_category==STRING_TYPE)
448+
{
449+
/* forget all previous candidates */
450+
candidates=current_candidate;
451+
last_candidate=current_candidate;
452+
}
453+
elseif (slot_category==STRING_TYPE)
454+
{
455+
/* forget this candidate */
456+
if (last_candidate)
457+
last_candidate->next=current_candidate->next;
458+
else
459+
candidates=current_candidate->next;
460+
}
448461
}
449462
elseif (current_type!=slot_type)
450463
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp