Re: fastgetattr & isNull

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: fastgetattr & isNull
Date: 2010-01-06 18:12:28
Message-ID: 20100106181228.GI6129@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas escribió:
> 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
>
> Changing the fourth argument from NULL to &isnull made the problem go away.
>
> I think we should either fix this so it actually works (if that's even
> possible), or rip out the code that tries to cope with it.

+1 for removing it. I used that macro as a pattern to write some other
macro to which I tried to pass a NULL value and wasted at least a couple
of hours trying to figure out why it wasn't working.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-06 18:16:53 Re: fastgetattr & isNull
Previous Message Alvaro Herrera 2010-01-06 18:08:05 Re: [HACKERS] tribble.postgresql.org - planned maintenance downtime