Add a transform function for numeric typmod coercisions.
Robert Haas <rhaas@postgresql.org>
Add a transform function for numeric typmod coercisions. This enables ALTER TABLE to skip table and index rebuilds when a column is changed to an unconstrained numeric, or when the scale is unchanged and the precision does not decrease. Noah Misch, with a few stylistic changes and a fix for an OID collision by me.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/numeric.c | modified | +48 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +3 −1 |
| src/include/utils/builtins.h | modified | +1 −0 |