From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: fastgetattr & isNull |
Date: | 2010-01-06 17:54:43 |
Message-ID: | 603c8f071001060954l7106c2b3m26a32dc47a6b1a3a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 6, 2010 at 9:43 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> 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. That
> probably wouldn't produce any measurable speedup, but at least it
> might save someone else some head-scratching the next time they're
> trying to learn this code.
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.
...Robert
Attachment | Content-Type | Size |
---|---|---|
getattr-null-tests.patch | text/x-patch | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2010-01-06 17:54:58 | Re: Type modifiers for DOMAIN |
Previous Message | Bruce Momjian | 2010-01-06 17:49:53 | Re: Status of plperl inter-sp calling |