Re: WriteBuffer return value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: WriteBuffer return value
Date: 2002-06-12 14:19:17
Message-ID: 9398.1023891557@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Manfred Koizar <mkoi-pg(at)aon(dot)at> writes:
> 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.

Given the lack of any error checks in 99% of the callers, I do not think
this is an appropriate change. I'd vote for changing WriteBuffer to
return void, and have it elog() on bad argument. No one should ever
pass it a bogus buffer ID anyway --- if you don't have a valid buffer
ID, then what the heck were you just scribbling on?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Oliver Elphick 2002-06-12 15:20:49 Re: GUC option log_pid is not checked [Fwd: Bug#149675:
Previous Message Tom Lane 2002-06-12 14:12:31 Re: GUC option log_pid is not checked [Fwd: Bug#149675: Fix]