WriteBuffer return value

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: pgsql-patches(at)postgresql(dot)org
Subject: WriteBuffer return value
Date: 2002-06-12 12:17:04
Message-ID: 4peegug5vmj5mbmefpbifrj7rtlmg31ljq@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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;
}

/*

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-06-12 14:12:31 Re: GUC option log_pid is not checked [Fwd: Bug#149675: Fix]
Previous Message Dave Page 2002-06-12 09:41:57 Re: UI Update (was: int8 becames string in BDE :-()