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

Commit9213462

Browse files
committed
Make procedure OUT parameters work with JDBC
The JDBC driver sends OUT parameters with type void. This makes sensewhen calling a function, so that the parameters are ignored inParseFuncOrColumn(). For a procedure call we want to treat them asunknown.Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Discussion:https://www.postgresql.org/message-id/flat/d7e49540-ea92-b4e2-5fff-42036102f968%402ndquadrant.com
1 parent8fed2ea commit9213462

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/backend/parser/parse_param.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ variable_paramref_hook(ParseState *pstate, ParamRef *pref)
163163
if (*pptype==InvalidOid)
164164
*pptype=UNKNOWNOID;
165165

166+
/*
167+
* If the argument is of type void and it's procedure call, interpret it
168+
* as unknown. This allows the JDBC driver to not have to distinguish
169+
* function and procedure calls. See also another component of this hack
170+
* in ParseFuncOrColumn().
171+
*/
172+
if (*pptype==VOIDOID&&pstate->p_expr_kind==EXPR_KIND_CALL_ARGUMENT)
173+
*pptype=UNKNOWNOID;
174+
166175
param=makeNode(Param);
167176
param->paramkind=PARAM_EXTERN;
168177
param->paramid=paramno;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp