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

Re: Another pgindent gripe

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another pgindent gripe
Date: 2001-06-06 04:51:56
Message-ID: 200106060451.f564pvY22291@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
OK, fixed.  Not sure why indent likes to add the tab, but I had some
code to change that:

# move trailing * in function return type
        sed 's;^\([A-Za-z_][^   ]*\)[   ][      ]*\*$;\1 *;' |
                            ^^^^
Turns out the marked area was missing a space, and was only tab.  Making
it tab and space in the indicated brackets fixed the problem.  My guess
is that the failure was only happening when the function return type was
exaclty eight characters, like "Material".


> Why does pgindent sometimes insert whitespace into the return type
> part of a function definition?  Here's an example from the last
> pgindent run:
> 
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v
> retrieving revision 1.103
> retrieving revision 1.104
> diff -c -r1.103 -r1.104
> *** pgsql/src/backend/optimizer/plan/createplan.c       2001/01/24 19:42:58     1.103
> --- pgsql/src/backend/optimizer/plan/createplan.c       2001/03/22 03:59:36     1.104
> ***************
> *** 1493,1499 ****
>         return make_sort(sort_tlist, lefttree, numsortkeys);
>   }
>   
> ! Material *
>   make_material(List *tlist, Plan *lefttree)
>   {
>         Material   *node = makeNode(Material);
> --- 1495,1501 ----
>         return make_sort(sort_tlist, lefttree, numsortkeys);
>   }
>   
> ! Material   *
>   make_material(List *tlist, Plan *lefttree)
>   {
>         Material   *node = makeNode(Material);
> 
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-06-06 04:54:01
Subject: Re: Imperfect solutions
Previous:From: Christopher Kings-LynneDate: 2001-06-06 04:42:41
Subject: RE: place for newbie postgresql hackers to work

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