Re: [v9.1] add makeRangeTblEntry() into makefuncs.c - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [v9.1] add makeRangeTblEntry() into makefuncs.c
Date
Msg-id 20100614124614.GF21875@tamriel.snowman.net
Whole thread Raw
In response to Re: [v9.1] add makeRangeTblEntry() into makefuncs.c  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [v9.1] add makeRangeTblEntry() into makefuncs.c
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> 2010/6/14 KaiGai Kohei <kaigai@ak.jp.nec.com>:
> > It adds makeRangeTblEntry() into makefuncs.c to keep the code more
> > clean. It shall be also used for the upcoming DML refactor patch.
> > In this refactoring, a common DML permission checker function take
> > a list of RangeTblEntry, so the caller has to set up the object.
>
> I think this is the epitome of pointless.  It looks to me like this
> just makes the code harder to read and very slightly slower without
> actually accomplishing any useful abstraction.

I had suggested to KaiGai that he check if there was an existing
function for creating an RTE rather than just malloc'ing it- he took
that to mean he should add one if he couldn't find one.  Wasn't my
intent, but by the same token I didn't see it as a terribly bad thing
either.  Perhaps it should be improved or maybe we should just rip it
out, but I rather prefer some kind of abstraction for that given it's
use in a number of places.  Of course, I may just be overly thinking it.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Command to prune archive at restartpoints
Next
From: Fujii Masao
Date:
Subject: Re: Proposal for 9.1: WAL streaming from WAL buffers