mirror of
https://github.com/postgres/postgres.git
synced 2025-10-18 04:29:09 +03:00
Use ereport() rather than elog()
Noah pointed this out before I committed 50f770c3d9
, but I
accidentally pushed the old version with elog() anyway. Oops.
Reported-by: Noah Misch <noah@leadboat.com>
Discussion: https://www.postgresql.org/message-id/20250820003756.31.nmisch@google.com
This commit is contained in:
@@ -1148,8 +1148,10 @@ heap_beginscan(Relation relation, Snapshot snapshot,
|
||||
IsHistoricMVCCSnapshot(snapshot) &&
|
||||
!RelationIsAccessibleInLogicalDecoding(relation))
|
||||
{
|
||||
elog(ERROR, "cannot query non-catalog table \"%s\" during logical decoding",
|
||||
RelationGetRelationName(relation));
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
|
||||
errmsg("cannot query non-catalog table \"%s\" during logical decoding",
|
||||
RelationGetRelationName(relation))));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -267,8 +267,10 @@ index_beginscan(Relation heapRelation,
|
||||
if (IsHistoricMVCCSnapshot(snapshot) &&
|
||||
!RelationIsAccessibleInLogicalDecoding(heapRelation))
|
||||
{
|
||||
elog(ERROR, "cannot query non-catalog table \"%s\" during logical decoding",
|
||||
RelationGetRelationName(heapRelation));
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
|
||||
errmsg("cannot query non-catalog table \"%s\" during logical decoding",
|
||||
RelationGetRelationName(heapRelation))));
|
||||
}
|
||||
|
||||
scan = index_beginscan_internal(indexRelation, nkeys, norderbys, snapshot, NULL, false);
|
||||
|
Reference in New Issue
Block a user