pgsql: Split out CreateCast into src/backend/catalog/pg_cast.c

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Split out CreateCast into src/backend/catalog/pg_cast.c
Date: 2020-03-10 15:48:48
Message-ID: E1jBh7g-0008Ta-Bp@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/40b3e2c201af10c27a2c4c5bfcd029026b4cdff3

Modified Files
--------------
src/backend/catalog/Makefile | 1 +
src/backend/catalog/pg_cast.c | 123 ++++++++++++++++++++++++++++++++++++
src/backend/commands/functioncmds.c | 100 +----------------------------
src/backend/commands/typecmds.c | 1 +
src/backend/utils/cache/lsyscache.c | 26 ++++++++
src/include/catalog/pg_cast.h | 9 +++
src/include/commands/defrem.h | 1 -
src/include/utils/lsyscache.h | 1 +
8 files changed, 164 insertions(+), 98 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-03-10 16:30:22 pgsql: Preserve integer and float values accurately in (de)serialize_de
Previous Message Tom Lane 2020-03-10 15:07:00 Re: pgsql: Remove win32ver.rc from version_stamp.pl