1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Remove typeidIsValid() checks in can_coerce_type(). These checks

were pretty expensive and I believe the case they were put in to
defend against can no longer arise, now that we have dependency checks
to prevent deletion of a type entry that is still referenced.  Certainly
the example given in the CVS log entry can't happen anymore.
Since this was the only use of typeidIsValid(), remove the routine too.
This commit is contained in:
Tom Lane
2005-05-29 18:24:14 +00:00
parent bbc048319f
commit d66daabec9
3 changed files with 3 additions and 19 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.128 2005/05/05 00:19:47 tgl Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.129 2005/05/29 18:24:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -371,12 +371,6 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids,
if (inputTypeId == targetTypeId)
continue;
/* don't choke on references to no-longer-existing types */
if (!typeidIsValid(inputTypeId))
return false;
if (!typeidIsValid(targetTypeId))
return false;
/* accept if target is ANY */
if (targetTypeId == ANYOID)
continue;