Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Replace a long chain of if's in eval_const_expressions_mutator by a switch()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Replace a long chain of if's in eval_const_expressions_mutator by a switch()
Date: 2011-11-28 21:47:52
Message-ID: 201111282147.pASLlrB21110@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On Friday, November 18, 2011 10:14:22 PM Tom Lane wrote:
> >> Andres Freund <andres(at)anarazel(dot)de> writes:
> >>> Replacing the if chain with if; else if; ... resulted in a small
> >>> speedup. Replacing it with a switch() in a bigger one.
> 
> >> Cool, but this patch is impossible to validate by eye.  Could you
> >> resubmit a version that doesn't reindent unchanged code?  Leave it
> >> for pgindent to clean that up later.
> 
> > Sure. It was just to confusing reading the code without reindenting.
> > Btw, I found git diff/show/blame -w very useful to view reindent code.
> 
> Applied, thanks.  Bruce, would you mind running pgindent on
> just src/backend/optimizer/util/clauses.c ?  That seems safer than
> reindenting manually.

Done.

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

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Nathan WagnerDate: 2011-11-28 22:12:20
Subject: Re: psql line number reporting from stdin
Previous:From: Alvaro HerreraDate: 2011-11-28 21:44:05
Subject: Re: strange nbtree corruption report

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group