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

Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Date: 2009-08-11 23:14:45
Message-ID: 200908112314.n7BNEjR16126@momjian.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Alvaro Herrera wrote:
> Andrew Dunstan escribi?:
> > 
> > 
> > Tom Lane wrote:
> > >Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > >>Robert Haas wrote:
> > >>>Where it really bit me as when it reindented the DATA() statements
> > >>>that were touched by ALTER TABLE ... SET STATISTICS DISTINCT.  It's
> > >>>not so hard to compare code, but comparing DATA() lines is the pits.
> > >
> > >>Oh? Maybe that's a problem we need to address more directly. I
> > >>just looked at what it did to the DATA lines - it seems to have
> > >>changed 501 of them, and all the changes seem to be to do with
> > >>tabbing.
> > >
> > >That's interesting --- the whitespace in those macros has always been
> > >wildly inconsistent, so I assumed pgindent wasn't touching them at all.
> > >I wonder what it thinks it's doing...
> > 
> > Here's the extract attached.  I replace tabs with a literal '\t' so
> > I could see what it was doing. I can't make much head or tail of it
> > either.
> 
> pgindent uses entab/detab, which counts spaces and replaces them with
> tabs.  It is wildly undocumented.  See src/tools/entab

I am not sure what documentation you want for it that isn't already
there.  There is an entab.man, and it is mentioned in the developer's
FAQ, and it understands 'entab -h' for help.

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

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2009-08-11 23:20:17
Subject: Re: HEAD docs
Previous:From: Bruce MomjianDate: 2009-08-11 23:12:50
Subject: Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

pgsql-committers by date

Next:From: Greg StarkDate: 2009-08-12 00:10:01
Subject: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)
Previous:From: Bruce MomjianDate: 2009-08-11 23:12:50
Subject: Re: Re: pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

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