Add a paramtypmod field to Param nodes. This is dead weight for Params
Tom Lane <tgl@sss.pgh.pa.us>
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 ...
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/copyfuncs.c | modified | +2 −1 |
| src/backend/nodes/equalfuncs.c | modified | +2 −1 |
| src/backend/nodes/outfuncs.c | modified | +2 −1 |
| src/backend/nodes/readfuncs.c | modified | +2 −1 |
| src/backend/optimizer/plan/subselect.c | modified | +13 −35 |
| src/backend/parser/parse_agg.c | modified | +4 −1 |
| src/backend/parser/parse_coerce.c | modified | +9 −1 |
| src/backend/parser/parse_expr.c | modified | +5 −1 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/nodes/primnodes.h | modified | +9 −3 |