mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add a paramtypmod field to Param nodes. This is dead weight for Params
representing externally-supplied values, since the APIs that carry such values only specify type not typmod. However, for PARAM_SUBLINK Params it is handy to carry the typmod of the sublink's output column. This is a much cleaner solution for the recently reported 'could not find pathkey item to sort' and 'failed to find unique expression in subplan tlist' bugs than my original 8.2-compatible patch. Besides, someday we might want to support typmods for external parameters ...
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_agg.c,v 1.73 2006/07/27 19:52:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_agg.c,v 1.74 2006/12/10 22:13:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -394,6 +394,7 @@ build_aggregate_fnexprs(Oid *agg_input_types,
|
||||
argp->paramkind = PARAM_EXEC;
|
||||
argp->paramid = -1;
|
||||
argp->paramtype = agg_state_type;
|
||||
argp->paramtypmod = -1;
|
||||
|
||||
args = list_make1(argp);
|
||||
|
||||
@ -403,6 +404,7 @@ build_aggregate_fnexprs(Oid *agg_input_types,
|
||||
argp->paramkind = PARAM_EXEC;
|
||||
argp->paramid = -1;
|
||||
argp->paramtype = agg_input_types[i];
|
||||
argp->paramtypmod = -1;
|
||||
args = lappend(args, argp);
|
||||
}
|
||||
|
||||
@ -425,6 +427,7 @@ build_aggregate_fnexprs(Oid *agg_input_types,
|
||||
argp->paramkind = PARAM_EXEC;
|
||||
argp->paramid = -1;
|
||||
argp->paramtype = agg_state_type;
|
||||
argp->paramtypmod = -1;
|
||||
args = list_make1(argp);
|
||||
|
||||
*finalfnexpr = (Expr *) makeFuncExpr(finalfn_oid,
|
||||
|
Reference in New Issue
Block a user