When a function not returning RECORD has a single OUT parameter, use
Tom Lane <tgl@sss.pgh.pa.us>
When a function not returning RECORD has a single OUT parameter, use the parameter's name (if any) as the default column name for SELECT FROM the function, rather than the function name as previously. I still think this is a bad idea, but I lost the argument. Force decompilation of function RTEs to specify full aliases always, to reduce the odds of this decision breaking dumped views.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_relation.c | modified | +55 −13 |
| src/backend/utils/adt/ruleutils.c | modified | +38 −10 |
| src/backend/utils/fmgr/funcapi.c | modified | +103 −1 |
| src/include/funcapi.h | modified | +3 −1 |
| src/test/regress/expected/plpgsql.out | modified | +3 −3 |
| src/test/regress/expected/rangefuncs.out | modified | +13 −13 |