Fix handling of pg_type.typdefault per bug report from Dave Blasby.
Tom Lane <tgl@sss.pgh.pa.us>
Fix handling of pg_type.typdefault per bug report from Dave Blasby. If there's anyone out there who's actually using datatype-defined default values, this will be an incompatible change in behavior ... but the old behavior was so broken that I doubt anyone was using it.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +9 −3 |
| src/backend/catalog/heap.c | modified | +8 −11 |
| src/backend/catalog/pg_type.c | modified | +21 −20 |
| src/backend/commands/define.c | modified | +9 −11 |
| src/backend/optimizer/prep/preptlist.c | modified | +36 −27 |
| src/backend/utils/cache/lsyscache.c | modified | +31 −61 |
| src/bin/pg_dump/pg_dump.c | modified | +16 −6 |
| src/include/catalog/pg_type.h | modified | +26 −5 |
| src/include/utils/lsyscache.h | modified | +2 −2 |
| src/test/regress/expected/create_type.out | modified | +25 −0 |
| src/test/regress/sql/create_type.sql | modified | +26 −0 |