File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,11 @@ static bool is_metadata_relation(Oid relation_oid)
9999 if (namespace_oid == PG_CATALOG_NAMESPACE )
100100 return true; /* PG_CATALOG relations are checked in `ExecutorCheckPerms` hook. */
101101
102- if (strcmp (get_namespace_name (namespace_oid ), "information_schema" ) == 0 )
103- return true; /* INFORMATION_SCHEMA relations are safe to query. */
102+ char * namespace_name = get_namespace_name (namespace_oid );
103+ bool result = strcmp (namespace_name , "information_schema" ) == 0 ; /* INFORMATION_SCHEMA relations are safe to query. */
104+ pfree (namespace_name );
104105
105- return false ;
106+ return result ;
106107}
107108
108109bool is_personal_relation (Oid relation_oid )
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ void verify_utility_command(Node *utility_stmt)
5353 case T_DeclareCursorStmt :
5454 case T_DeallocateStmt :
5555 case T_FetchStmt :
56+ case T_ClosePortalStmt :
5657 break ;
5758 default :
5859 FAILWITH ("Statement requires direct access level." );
You can’t perform that action at this time.
0 commit comments