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

Commitea19c87

Browse files
committed
get_expr_result_type probably needs to be able to handle OpExpr as well
as FuncExpr, to cover cases where a function returning tuple is invokedvia an operator.
1 parent238fb03 commitea19c87

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/backend/utils/fmgr/funcapi.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2002-2005, PostgreSQL Global Development Group
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.20 2005/04/05 06:22:14 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.21 2005/04/25 20:59:44 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -229,6 +229,12 @@ get_expr_result_type(Node *expr,
229229
NULL,
230230
resultTypeId,
231231
resultTupleDesc);
232+
elseif (expr&&IsA(expr,OpExpr))
233+
result=internal_get_result_type(get_opcode(((OpExpr*)expr)->opno),
234+
expr,
235+
NULL,
236+
resultTypeId,
237+
resultTupleDesc);
232238
else
233239
{
234240
/* handle as a generic expression; no chance to resolve RECORD */
@@ -247,7 +253,7 @@ get_expr_result_type(Node *expr,
247253
}
248254

249255
/*
250-
*get_expr_result_type
256+
*get_func_result_type
251257
*As above, but work from a function's OID only
252258
*
253259
* This will not be able to resolve pure-RECORD results nor polymorphism.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp