Re: PATCH: CreateComments: use explicit indexing for ``values''

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, richhguard-monotone <richhguard-monotone(at)yahoo(dot)co(dot)uk>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: CreateComments: use explicit indexing for ``values''
Date: 2011-06-14 14:50:43
Message-ID: BANLkTi=iK7ixy=bBTN=okdJuz2PGQyR_Yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 14, 2011 at 10:30 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Excerpts from richhguard-monotone's message of lun jun 13 16:10:17 -0400 2011:
>>> Do you have any advice of how to handle the inner loops, such as those initializing ``stakindN''. The entries before can be handled just like in this patch, by using the symbolic constants.
>
>> Based on Tom's comments, I'd submit the patch without that bit, at least
>> as a first step.
>
> He already did no?
>
> I did think of a possible way to rewrite update_attstats: instead of
>
>        for (k = 0; k < STATISTIC_NUM_SLOTS; k++)
>        {
>            values[i++] = ObjectIdGetDatum(stats->staop[k]);    /* staopN */
>        }
>
> do
>
>        for (k = 0; k < STATISTIC_NUM_SLOTS; k++)
>        {
>            values[Anum_pg_statistic_staop1 - 1 + k] = ObjectIdGetDatum(stats->staop[k]);
>        }
>
> etc.  However, it's not clear to me whether this is really an
> improvement.  Opinions?

I don't care that much, but IMV that's just gilding the lily.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-06-14 14:52:42 Re: PATCH: CreateComments: use explicit indexing for ``values''
Previous Message Alvaro Herrera 2011-06-14 14:35:53 Re: ITYM DROP TABLE