On Wed, Jan 6, 2010 at 1:05 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@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.
Hmm, I didn't think of that. I don't see any attempt at doing that in the source code anywhere, though. > Still, it's not entirely clear to me why ignoring the possibility of > a null value would be a good idea. It's harmless if (Datum) 0 can't be a datum of the relevant type, because you can still distinguish whether you got a result back. But you can always pass a dummy boolean point if you really want to do that. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers