Re: fastgetattr & isNull - Mailing list pgsql-hackers

From Robert Haas
Subject Re: fastgetattr & isNull
Date
Msg-id 603c8f071001061040mb0b755fp6047cbb6532a3def@mail.gmail.com
Whole thread Raw
In response to Re: fastgetattr & isNull  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 6, 2010 at 1:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Well, that comment is a bit misleading too, since a pointer with a
>> NULL value might work but a literal NULL certainly doesn't.
>
> I think "(bool *) NULL" would work.  What your compiler is complaining
> about is trying to dereference a "void *" expression.
>
> In practice, the people we'd need to reach with a comment would be ones
> who had working code before --- and working code, in this context, would
> most likely be code that was passing a pointer variable that contained
> null.  But as I said, I don't think it really requires any comment.

I was less thinking of people whose code might break and more thinking
of people who might be trying to understand the preconditions for
using the macro.  But on further reflection I think a lot more
documentation would be needed to really make that clear, so I'll skip
it for now.

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fastgetattr & isNull
Next
From: Tom Lane
Date:
Subject: Re: snapshot generation broken again...