WriteBuffer return value - Mailing list pgsql-patches

From Manfred Koizar
Subject WriteBuffer return value
Date
Msg-id 4peegug5vmj5mbmefpbifrj7rtlmg31ljq@4ax.com
Whole thread Raw
Responses Re: WriteBuffer return value
List pgsql-patches
Fix WriteBuffer() to return STATUS_OK/STATUS_ERROR instead of
TRUE/FALSE.  The return value is used by nextval() and do_setval()
in sequence.c,  all other callers ignore the return value.

diff -ur ../orig/src/backend/storage/buffer/bufmgr.c src/backend/storage/buffer/bufmgr.c
--- ../orig/src/backend/storage/buffer/bufmgr.c    2002-06-10 15:00:57.000000000 +0200
+++ src/backend/storage/buffer/bufmgr.c    2002-06-11 17:42:26.000000000 +0200
@@ -580,7 +580,7 @@
         return WriteLocalBuffer(buffer, TRUE);

     if (BAD_BUFFER_ID(buffer))
-        return FALSE;
+        return STATUS_ERROR;

     bufHdr = &BufferDescriptors[buffer - 1];

@@ -592,7 +592,7 @@
     UnpinBuffer(bufHdr);
     LWLockRelease(BufMgrLock);

-    return TRUE;
+    return STATUS_OK;
 }

 /*


pgsql-patches by date:

Previous
From: Oliver Elphick
Date:
Subject: GUC option log_pid is not checked [Fwd: Bug#149675: Fix]
Next
From: Tom Lane
Date:
Subject: Re: GUC option log_pid is not checked [Fwd: Bug#149675: Fix]