Split out CreateCast into src/backend/catalog/pg_cast.c
Alvaro Herrera <alvherre@alvh.no-ip.org>
Split out CreateCast into src/backend/catalog/pg_cast.c This catalog-handling code was previously together with the rest of CastCreate() in src/backend/commands/functioncmds.c. A future patch will need a way to add casts internally, so this will be useful to have separate. Also, move the nearby get_cast_oid() function from functioncmds.c to lsyscache.c, which seems a more natural place for it. Author: Paul Jungwirth, minor edits by Álvaro Discussion: https://postgr.es/m/20200309210003.GA19992@alvherre.pgsql
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/Makefile | modified | +1 −0 |
| src/backend/catalog/pg_cast.c | added | +123 −0 |
| src/backend/commands/functioncmds.c | modified | +3 −97 |
| src/backend/commands/typecmds.c | modified | +1 −0 |
| src/backend/utils/cache/lsyscache.c | modified | +26 −0 |
| src/include/catalog/pg_cast.h | modified | +9 −0 |
| src/include/commands/defrem.h | modified | +0 −1 |
| src/include/utils/lsyscache.h | modified | +1 −0 |
Discussion
- time for catalog/pg_cast.c? 4 messages · 2020-03-09 → 2020-03-10