Skip to content

Commit

Permalink
Closing the tables after the scan
Browse files Browse the repository at this point in the history
Signed-off-by: P Aswini Kumar <[email protected]>
  • Loading branch information
P Aswini Kumar committed Sep 10, 2024
1 parent 3de967e commit 71f0bf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/babelfishpg_tsql/src/catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -5031,10 +5031,11 @@ user_exists_for_db(const char *db_name, const char *user_name)

tuple_user_ext = heap_getnext(scan, ForwardScanDirection);

table_endscan(scan);
table_close(bbf_authid_user_ext_rel, RowExclusiveLock);

if (HeapTupleIsValid(tuple_user_ext))
{
table_endscan(scan);
table_close(bbf_authid_user_ext_rel, RowExclusiveLock);
return true;
}

Expand Down

0 comments on commit 71f0bf3

Please sign in to comment.