A few pgindent oddities - Mailing list pgsql-hackers

From Tom Lane
Subject A few pgindent oddities
Date
Msg-id 6001.1132699064@sss.pgh.pa.us
Whole thread Raw
Responses Re: A few pgindent oddities  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Since we were breaking our usual rule by re-indenting the 8.1 branch,
I took the time to eyeball the whole "cvs diff" for changes that weren't
just comment block fixes.  I found a few things that need attention.

This change is disturbing first because it seems completely unnecessary,
and second because I'm not convinced that every C preprocessor will deal
correctly with a comment continued off a #endif line:

Index: contrib/pgbench/pgbench.c
***************
*** 1110,1116 ****                     fprintf(stderr, "Use limit/ulimt to increase the limit before using
pgbench.\n");                    exit(1);                 }
 
! #endif   /* #if !(defined(__CYGWIN__) || defined(__MINGW32__)) */                 break;             case 'C':
        is_connect = 1;
 
--- 1110,1117 ----                     fprintf(stderr, "Use limit/ulimt to increase the limit before using
pgbench.\n");                    exit(1);                 }
 
! #endif   /* #if !(defined(__CYGWIN__) ||
!                                  * defined(__MINGW32__)) */                 break;             case 'C':
  is_connect = 1;
 


This change seems odd and unnecessary as well:

Index: src/backend/access/transam/slru.c
***************
*** 252,258 ****             /* indeed, the I/O must have failed */             if (shared->page_status[slotno] ==
SLRU_PAGE_READ_IN_PROGRESS)                shared->page_status[slotno] = SLRU_PAGE_EMPTY;
 
!             else                /* write_in_progress */             {                 shared->page_status[slotno] =
SLRU_PAGE_VALID;                shared->page_dirty[slotno] = true;
 
--- 253,260 ----             /* indeed, the I/O must have failed */             if (shared->page_status[slotno] ==
SLRU_PAGE_READ_IN_PROGRESS)                shared->page_status[slotno] = SLRU_PAGE_EMPTY;
 
!             else
!                 /* write_in_progress */             {                 shared->page_status[slotno] = SLRU_PAGE_VALID;
              shared->page_dirty[slotno] = true;
 


And what happened here?

Index: src/interfaces/libpq/libpq-fe.h
***************
*** 35,41 ****  /* Application-visible enum types */ 
! typedef enum {     /*      * Although it is okay to add to this list, values which become unused
--- 35,41 ----  /* Application-visible enum types */ 
!             typedef enum {     /*      * Although it is okay to add to this list, values which become unused

        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Time for pgindent?
Next
From: Bruce Momjian
Date:
Subject: Re: Improving count(*)