diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-10 11:28:23 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-10 11:28:23 -0300 |
commit | 40b3e2c201af10c27a2c4c5bfcd029026b4cdff3 (patch) | |
tree | c19e65a9b38c3ed42c26d58a25a349d0049a8606 /src/include/utils/lsyscache.h | |
parent | 0a42a2e9ce8481a024d085f2cc526a366db8df59 (diff) | |
download | postgresql-40b3e2c201af10c27a2c4c5bfcd029026b4cdff3.tar.gz postgresql-40b3e2c201af10c27a2c4c5bfcd029026b4cdff3.zip |
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
Diffstat (limited to 'src/include/utils/lsyscache.h')
-rw-r--r-- | src/include/utils/lsyscache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 131d10eab07..6e93590befc 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -90,6 +90,7 @@ extern char get_attgenerated(Oid relid, AttrNumber attnum); extern Oid get_atttype(Oid relid, AttrNumber attnum); extern void get_atttypetypmodcoll(Oid relid, AttrNumber attnum, Oid *typid, int32 *typmod, Oid *collid); +extern Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok); extern char *get_collation_name(Oid colloid); extern bool get_collation_isdeterministic(Oid colloid); extern char *get_constraint_name(Oid conoid); |