Refactor identity sequence retrieval for improved readability and add cleanup to regression test for issue 7887

m3hm3t/issue_7887
Mehmet Yilmaz 2025-03-05 10:13:10 +00:00
parent ee1992d4c5
commit b78a344005
2 changed files with 4 additions and 1 deletions

View File

@ -1130,7 +1130,8 @@ ReorderInsertSelectTargetLists(Query *originalQuery, RangeTblEntry *insertRte,
oldInsertTargetEntry->resname); oldInsertTargetEntry->resname);
bool missingOk = false; bool missingOk = false;
Oid seqOid = getIdentitySequence(identitySequenceRelation_compat(targetRel), attrNum, missingOk); Oid seqOid = getIdentitySequence(identitySequenceRelation_compat(
targetRel), attrNum, missingOk);
if (!OidIsValid(seqOid)) if (!OidIsValid(seqOid))
{ {
table_close(targetRel, AccessShareLock); table_close(targetRel, AccessShareLock);

View File

@ -88,4 +88,6 @@ UNION ALL
SELECT 'local2_bydefault', * FROM local2_bydefault SELECT 'local2_bydefault', * FROM local2_bydefault
ORDER BY table_name, id; ORDER BY table_name, id;
-- Cleanup
SET client_min_messages TO WARNING;
DROP SCHEMA issue_7887 CASCADE; DROP SCHEMA issue_7887 CASCADE;