Re: A minor correction in comment in heaptuple.c

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A minor correction in comment in heaptuple.c
Date: 2014-01-25 21:33:16
Message-ID: 20140125213316.GF9750@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 25, 2014 at 10:29:36PM +0100, Andres Freund wrote:
> On 2014-01-25 16:28:09 -0500, Bruce Momjian wrote:
> > On Tue, Jun 18, 2013 at 11:04:25AM -0700, Kevin Grittner wrote:
> > > D'Arcy J.M. Cain <darcy(at)druid(dot)net>
> > >
> > > > Although, the more I think about it, the more I think that the comment
> > > > is both confusing and superfluous.  The code itself is much clearer.
> > >
> > > Seriously, if there is any comment there at all, it should be a
> > > succinct explanation for why we didn't do this (which passes `make
> > > check-world`):
> >
> > Is everyone OK with me applying this patch from Kevin, attached?
>
> No. I still think this is stupid. Not at all clearer and possibly breaks
> stuff.

OK, how about if we change the comment to this:

/*
--> * assume NULL if attnum is out of range according to the tupdesc
*/
if (attnum > tupleDesc->natts)
return true;

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-01-25 21:36:56 Re: Memory leak in PL/pgSQL function which CREATE/SELECT/DROP a temporary table
Previous Message Andres Freund 2014-01-25 21:29:36 Re: A minor correction in comment in heaptuple.c