Allow ALTER TYPE to update an existing type's typsubscript value.
Tom Lane <tgl@sss.pgh.pa.us>
Allow ALTER TYPE to update an existing type's typsubscript value. This is essential if we'd like to allow existing extension data types to support subscripting in future, since dropping and recreating the type isn't a practical thing for an extension upgrade script, and direct manipulation of pg_type isn't a great answer either. There was some discussion about also allowing alteration of typelem, but it's less clear whether that's a good idea or not, so for now I forebore. Discussion: https://postgr.es/m/3724341.1607551174@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_type.sgml | modified | +8 −0 |
| src/backend/commands/typecmds.c | modified | +20 −0 |
| src/test/regress/expected/create_type.out | modified | +19 −17 |
| src/test/regress/sql/create_type.sql | modified | +7 −5 |
Documentation touched
Discussion
- [PATCH] Generic type subscripting 276 messages · 2017-02-28 → 2021-02-01