Re: fastgetattr & isNull

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fastgetattr & isNull
Дата
Msg-id 21698.1262801813@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fastgetattr & isNull  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: fastgetattr & isNull  (Robert Haas <robertmhaas@gmail.com>)
Re: fastgetattr & isNull  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Spoke with Bruce on IM and we think the best option is to just remove
> the NULL tests.  Since it's been this way for 11 years, presumably
> nobody is trying to use it with a NULL fourth argument.

> Proposed patch attached.

There are a number of is-null checks in related code that ought to go
away too --- look at heap_getattr, nocachegetattr, etc.  Our principle
here ought to be that none of the field-fetching routines allow a null
pointer.

I wouldn't bother with those added comments.  They wouldn't have been
there if the code had always been like this.  If you feel a need to
have a comment, it should be more like "Before Postgres 8.5, the isnull
argument could be a null pointer, but we no longer allow that".  That
way tells people that there was a change here that might affect their
code, whereas the addition you suggest wouldn't flag that.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: fastgetattr & isNull
Следующее
От: Robert Haas
Дата:
Сообщение: Re: fastgetattr & isNull