diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-12-19 12:08:30 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-12-19 12:08:30 -0300 |
commit | 2b93e3d96b941740877b2ae196511564e5cc989b (patch) | |
tree | a582af1661ea359b86c62b23d850e683a96ea9a1 | |
parent | 54fbd155cc6fdbf875185035b3d9823f739b617d (diff) | |
download | postgresql-2b93e3d96b941740877b2ae196511564e5cc989b.tar.gz postgresql-2b93e3d96b941740877b2ae196511564e5cc989b.zip |
makeArrayTypeName: Remove pointless relation open/close
Discussion: https://postgr.es/m/20191218221326.GA25537@alvherre.pgsql
-rw-r--r-- | src/backend/catalog/pg_type.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index a8c1de511f5..d65a2d971f4 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -785,15 +785,12 @@ makeArrayTypeName(const char *typeName, Oid typeNamespace) { char *arr = (char *) palloc(NAMEDATALEN); int namelen = strlen(typeName); - Relation pg_type_desc; int i; /* * The idea is to prepend underscores as needed until we make a name that * doesn't collide with anything... */ - pg_type_desc = table_open(TypeRelationId, AccessShareLock); - for (i = 1; i < NAMEDATALEN - 1; i++) { arr[i - 1] = '_'; @@ -810,8 +807,6 @@ makeArrayTypeName(const char *typeName, Oid typeNamespace) break; } - table_close(pg_type_desc, AccessShareLock); - if (i >= NAMEDATALEN - 1) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), |