Re: A minor correction in comment in heaptuple.c

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A minor correction in comment in heaptuple.c
Date: 2013-06-18 09:06:35
Message-ID: CA+HiwqFm465X645Uv72RUsVagLTqcHpHuXbi7PMpvu8WiMQO+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 18, 2013 at 6:01 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Hi,
>
> On 2013-06-18 17:56:34 +0900, Amit Langote wrote:
>> Should it be: "return true if attnum is out of range according to the
>> tupdesc" instead of "return NULL if attnum is out of range according
>> to the tupdesc" at src/backend/access/common/heaptuple.c: 1345
>>
>> /*
>> * return true if attnum is out of range according to the tupdesc
>> */
>> if (attnum > tupleDesc->natts)
>> return true;
>
> Well, true actually tells us that the attribute is null, since that's
> the purpose of the function:
>
> /*
> * slot_attisnull
> * Detect whether an attribute of the slot is null, without
> * actually fetching it.
> */
>
> I think the comment is more meaningfull before the change since it tells
> us how nonexisting columns are interpreted.
>

Okay, that makes sense.

--
Amit Langote

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2013-06-18 09:21:15 Re: A minor correction in comment in heaptuple.c
Previous Message Andres Freund 2013-06-18 09:01:28 Re: A minor correction in comment in heaptuple.c