Re: Identifying no-op length coercions

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Alexey Klyukin <alexk(at)commandprompt(dot)com>
Subject: Re: Identifying no-op length coercions
Date: 2011-06-19 11:10:42
Message-ID: 20110619111042.GA32068@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 18, 2011 at 11:32:20PM -0400, Robert Haas wrote:
> On Sat, Jun 18, 2011 at 11:12 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > On Sat, Jun 18, 2011 at 11:06 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >> On Sat, Jun 18, 2011 at 10:57:13PM -0400, Robert Haas wrote:
> >>> On Sat, Jun 11, 2011 at 5:13 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >>> > Sounds good. ?Updated patch attached, incorporating your ideas. ?Before applying
> >>> > it, run this command to update the uninvolved pg_proc.h DATA entries:
> >>> > ?perl -pi -e 's/PGUID(\s+\d+){4}/$& 0/' src/include/catalog/pg_proc.h
> >>>
> >>> This doesn't quite apply any more. ?I think the pgindent run broke it slightly.
> >>
> >> Hmm, I just get two one-line offsets when applying it to current master. ?Note
> >> that you need to run the perl invocation before applying the patch. ?Could you
> >> provide full output of your `patch' invocation, along with any reject files?
> >
> > Ah, crap. ?You're right. ?I didn't follow your directions for how to
> > apply the patch. ?Sorry.
>
> I think you need to update the comment in simplify_function() to say
> that we have three strategies, rather than two. I think it would also
> be appropriate to add a longish comment just before the test that
> calls protransform, explaining what the charter of that function is
> and why the mechanism exists.

Good idea. See attached.

> Documentation issues aside, I see very little not to like about this.

Great! Thanks for reviewing.

Attachment Content-Type Size
noop-length-coercion-v3.patch text/plain 21.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-06-19 11:29:49 Re: plpgsql performance - SearchCatCache issue
Previous Message Pavel Stehule 2011-06-19 11:09:12 Re: plpgsql performance - SearchCatCache issue