Skip to content

Commit 15dfd41

Browse files
committed
rework per CodeRabbitai's comments
1 parent 51b3b6a commit 15dfd41

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/backend/parser/parse_utilcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
285285
RangeVar *inh = lfirst_node(RangeVar, inher);
286286
Relation prel;
287287
prel = table_openrv(inh, AccessShareLock);
288-
cxt.hasrowid = prel->rd_rel->relhasrowid;
288+
cxt.hasrowid = cxt.hasrowid || prel->rd_rel->relhasrowid;
289289
table_close(prel, NoLock);
290290
}
291291
}

src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ RelationGetRowIdSeqId(Relation relation)
910910
TableScanDesc scan;
911911
Relation class_rel;
912912
StringInfoData rowid_seq;
913-
Oid seqoid;
913+
Oid seqoid = InvalidOid;
914914

915915
initStringInfo(&rowid_seq);
916916
appendStringInfo(&rowid_seq, "%s", RelationGetRelationName(relation));

src/pl/plisql/src/pl_exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7410,7 +7410,7 @@ exec_move_row_from_fields(PLiSQL_execstate *estate,
74107410
int anum;
74117411
int strict_multiassignment_level = 0;
74127412

7413-
HeapTupleHeader tuphd;
7413+
HeapTupleHeader tuphd = NULL;
74147414
Oid tupType;
74157415
int32 tupTypmod;
74167416
TupleDesc rowidtupdesc;
@@ -7450,7 +7450,7 @@ exec_move_row_from_fields(PLiSQL_execstate *estate,
74507450

74517451
for (int i = 0; i < tupdesc->natts; i++)
74527452
{
7453-
if (strcmp(pstrdup(NameStr(tupdesc->attrs[i].attname)), "rowid") == 0)
7453+
if (strcmp(NameStr(tupdesc->attrs[i].attname), "rowid") == 0)
74547454
tuphd = DatumGetHeapTupleHeader(values[i]);
74557455
}
74567456

0 commit comments

Comments
 (0)