Skip to content

Commit 2b93e3d

Browse files
committed
makeArrayTypeName: Remove pointless relation open/close
Discussion: https://postgr.es/m/20191218221326.GA25537@alvherre.pgsql
1 parent 54fbd15 commit 2b93e3d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/backend/catalog/pg_type.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,15 +785,12 @@ makeArrayTypeName(const char *typeName, Oid typeNamespace)
785785
{
786786
char *arr = (char *) palloc(NAMEDATALEN);
787787
int namelen = strlen(typeName);
788-
Relation pg_type_desc;
789788
int i;
790789

791790
/*
792791
* The idea is to prepend underscores as needed until we make a name that
793792
* doesn't collide with anything...
794793
*/
795-
pg_type_desc = table_open(TypeRelationId, AccessShareLock);
796-
797794
for (i = 1; i < NAMEDATALEN - 1; i++)
798795
{
799796
arr[i - 1] = '_';
@@ -810,8 +807,6 @@ makeArrayTypeName(const char *typeName, Oid typeNamespace)
810807
break;
811808
}
812809

813-
table_close(pg_type_desc, AccessShareLock);
814-
815810
if (i >= NAMEDATALEN - 1)
816811
ereport(ERROR,
817812
(errcode(ERRCODE_DUPLICATE_OBJECT),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy