Add select_common_typmod()
Peter Eisentraut <peter@eisentraut.org>
Add select_common_typmod() This accompanies select_common_type() and select_common_collation(). Typmods were previously combined using hand-coded logic in several places. The logic in select_common_typmod() isn't very exciting, but it makes the code more compact and readable in a few locations, and in the future we can perhaps do more complicated things if desired. As a small enhancement, the type unification of the direct and aggregate arguments of hypothetical-set aggregates now unifies the typmod as well using this new function, instead of just dropping it. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/97df3af9-8b5e-fb7f-a029-3eb7e80d7af9@2ndquadrant.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/analyze.c | modified | +6 −20 |
| src/backend/parser/parse_clause.c | modified | +6 −17 |
| src/backend/parser/parse_coerce.c | modified | +37 −0 |
| src/backend/parser/parse_func.c | modified | +6 −2 |
| src/include/parser/parse_coerce.h | modified | +2 −0 |
Discussion
- select_common_typmod 3 messages · 2020-10-20 → 2020-10-27