Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
9606f362
Commit
9606f362
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Someone (probably me) forgot about handling of typecasts applied to
parameters.
parent
91124a2f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/parser/parse_expr.c
+9
-6
9 additions, 6 deletions
src/backend/parser/parse_expr.c
with
9 additions
and
6 deletions
src/backend/parser/parse_expr.c
+
9
−
6
View file @
9606f362
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.7
1
2000/0
2/26 21:11:10
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.7
2
2000/0
3/07 23:30:53
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -78,19 +78,21 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
...
@@ -78,19 +78,21 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
ParamNo
*
pno
=
(
ParamNo
*
)
expr
;
ParamNo
*
pno
=
(
ParamNo
*
)
expr
;
int
paramno
=
pno
->
number
;
int
paramno
=
pno
->
number
;
Oid
toid
=
param_type
(
paramno
);
Oid
toid
=
param_type
(
paramno
);
Param
*
param
;
Param
*
param
=
makeNode
(
Param
)
;
if
(
!
OidIsValid
(
toid
))
if
(
!
OidIsValid
(
toid
))
elog
(
ERROR
,
"Parameter '$%d' is out of range"
,
paramno
);
elog
(
ERROR
,
"Parameter '$%d' is out of range"
,
paramno
);
param
=
makeNode
(
Param
);
param
->
paramkind
=
PARAM_NUM
;
param
->
paramkind
=
PARAM_NUM
;
param
->
paramid
=
(
AttrNumber
)
paramno
;
param
->
paramid
=
(
AttrNumber
)
paramno
;
param
->
paramname
=
"<unnamed>"
;
param
->
paramname
=
"<unnamed>"
;
param
->
paramtype
=
(
Oid
)
toid
;
param
->
paramtype
=
toid
;
param
->
param_tlist
=
(
List
*
)
NUL
L
;
param
->
param_tlist
=
NI
L
;
result
=
transformIndirection
(
pstate
,
(
Node
*
)
param
,
result
=
transformIndirection
(
pstate
,
(
Node
*
)
param
,
pno
->
indirection
);
pno
->
indirection
);
/* XXX what about cast (typename) applied to Param ??? */
/* cope with typecast applied to param */
if
(
pno
->
typename
!=
NULL
)
result
=
parser_typecast_expression
(
pstate
,
result
,
pno
->
typename
);
break
;
break
;
}
}
case
T_TypeCast
:
case
T_TypeCast
:
...
@@ -732,6 +734,7 @@ exprTypmod(Node *expr)
...
@@ -732,6 +734,7 @@ exprTypmod(Node *expr)
* We assume that a two-argument function named for a datatype, whose
* We assume that a two-argument function named for a datatype, whose
* output and first argument types are that datatype, and whose second
* output and first argument types are that datatype, and whose second
* input is an int32 constant, represents a forced length coercion.
* input is an int32 constant, represents a forced length coercion.
*
* XXX It'd be better if the parsetree retained some explicit indication
* XXX It'd be better if the parsetree retained some explicit indication
* of the coercion, so we didn't need these heuristics.
* of the coercion, so we didn't need these heuristics.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment