Re: fastgetattr & isNull
От | Tom Lane |
---|---|
Тема | Re: fastgetattr & isNull |
Дата | |
Msg-id | 19485.1262801106@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | fastgetattr & isNull (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: fastgetattr & isNull
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > The fastgetattr() attempts to make provision for the case where isnull > is a NULL pointer, but it doesn't seem to work. I tried it and got: > relcache.c:494: error: invalid use of void expression > relcache.c:494: error: invalid use of void expression > relcache.c:494: warning: left-hand operand of comma expression has no effect > relcache.c:494: warning: left-hand operand of comma expression has no effect Hmm. I think the macro means to handle the case where the argument is a pointer variable whose value is null, not the case of writing "NULL" as a literal argument. Still, it's not entirely clear to me why ignoring the possibility of a null value would be a good idea. So far as I can see, we have at least the following coding pattern everywhere this is used: fastgetattr(..., &isnull); Assert(!isnull); and I don't think it's good coding style to go without even an Assert. So +1 for removing the support for a null pointer ... regards, tom lane
В списке pgsql-hackers по дате отправления: