Re: WriteBuffer return value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WriteBuffer return value
Дата
Msg-id 9398.1023891557@sss.pgh.pa.us
обсуждение исходный текст
Ответ на WriteBuffer return value  (Manfred Koizar <mkoi-pg@aon.at>)
Ответы Re: WriteBuffer return value  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-patches
Manfred Koizar <mkoi-pg@aon.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GUC option log_pid is not checked [Fwd: Bug#149675: Fix]
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: [ODBC] UI Update (was: int8 becames string in BDE :-()