diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-10-18 19:28:28 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-10-23 14:47:14 +0200 |
commit | c903bb7b1c3ce82e21d6bd1af1dc45a58cd88455 (patch) | |
tree | 6583ba2c6b78a4a759fd1ec5d593488e4db96647 /src/backend/utils/cache | |
parent | e6f5d1accd3ae170a0baa632bfe3396bdd9b6e92 (diff) | |
download | postgresql-c903bb7b1c3ce82e21d6bd1af1dc45a58cd88455.tar.gz postgresql-c903bb7b1c3ce82e21d6bd1af1dc45a58cd88455.zip |
Remove get_atttypmod()
This has been unused since 2004. get_atttypetypmodcoll() is often a
better alternative.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r-- | src/backend/utils/cache/lsyscache.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index 12b2532d957..c53bda98671 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -881,39 +881,12 @@ get_atttype(Oid relid, AttrNumber attnum) } /* - * get_atttypmod - * - * Given the relation id and the attribute number, - * return the "atttypmod" field from the attribute relation. - */ -int32 -get_atttypmod(Oid relid, AttrNumber attnum) -{ - HeapTuple tp; - - tp = SearchSysCache2(ATTNUM, - ObjectIdGetDatum(relid), - Int16GetDatum(attnum)); - if (HeapTupleIsValid(tp)) - { - Form_pg_attribute att_tup = (Form_pg_attribute) GETSTRUCT(tp); - int32 result; - - result = att_tup->atttypmod; - ReleaseSysCache(tp); - return result; - } - else - return -1; -} - -/* * get_atttypetypmodcoll * * A three-fer: given the relation id and the attribute number, * fetch atttypid, atttypmod, and attcollation in a single cache lookup. * - * Unlike the otherwise-similar get_atttype/get_atttypmod, this routine + * Unlike the otherwise-similar get_atttype, this routine * raises an error if it can't obtain the information. */ void |