aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 050efdc4806..3701d8e59d5 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -2801,7 +2801,9 @@ l1:
if (result == HeapTupleInvisible)
{
UnlockReleaseBuffer(buffer);
- elog(ERROR, "attempted to delete invisible tuple");
+ ereport(ERROR,
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("attempted to delete invisible tuple")));
}
else if (result == HeapTupleBeingUpdated && wait)
{
@@ -3343,7 +3345,9 @@ l2:
if (result == HeapTupleInvisible)
{
UnlockReleaseBuffer(buffer);
- elog(ERROR, "attempted to update invisible tuple");
+ ereport(ERROR,
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("attempted to update invisible tuple")));
}
else if (result == HeapTupleBeingUpdated && wait)
{