Re: pgindent weirdness

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgindent weirdness
Дата
Msg-id 201110122054.p9CKsNO03670@momjian.us
обсуждение исходный текст
Ответ на Re: pgindent weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> Now having said that, there seems to be a pgindent bug here too, in that
> >> it's throwing a space into
> >>
> >> Buffer
> >> RelationGetBufferForTuple(Relation relation, Size len,
> >> Buffer otherBuffer, int options,
> >> struct BulkInsertStateData * bistate)
> >>
> >> Whether BulkInsertStateData is flagged as a typedef or not, surely it
> >> ought to understand that "struct BulkInsertStateData" is a type name.
>
> > Uh, I think we have this listed as a known bug at the top of the
> > pgindent script:
>
> Hm.  I guess the third observation is that in the current state of the
> code, there's no very good reason to be using "struct" in
> RelationGetBufferForTuple's prototype anyway, since the typedef is
> declared right above it.  Maybe we should just change that and not
> risk fooling with pgindent.

Changed as you suggested.  I didn't see any other obvious cases.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
new file mode 100644
index 26db1e3..beecc90
*** a/src/backend/access/heap/hio.c
--- b/src/backend/access/heap/hio.c
*************** GetVisibilityMapPins(Relation relation,
*** 213,219 ****
  Buffer
  RelationGetBufferForTuple(Relation relation, Size len,
                            Buffer otherBuffer, int options,
!                           struct BulkInsertStateData * bistate,
                            Buffer *vmbuffer, Buffer *vmbuffer_other)
  {
      bool        use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
--- 213,219 ----
  Buffer
  RelationGetBufferForTuple(Relation relation, Size len,
                            Buffer otherBuffer, int options,
!                           BulkInsertState bistate,
                            Buffer *vmbuffer, Buffer *vmbuffer_other)
  {
      bool        use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
diff --git a/src/include/access/hio.h b/src/include/access/hio.h
new file mode 100644
index 6eac97e..aefd679
*** a/src/include/access/hio.h
--- b/src/include/access/hio.h
*************** extern void RelationPutHeapTuple(Relatio
*** 38,44 ****
                       HeapTuple tuple);
  extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
                            Buffer otherBuffer, int options,
!                           struct BulkInsertStateData * bistate,
                            Buffer *vmbuffer, Buffer *vmbuffer_other);

  #endif   /* HIO_H */
--- 38,44 ----
                       HeapTuple tuple);
  extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
                            Buffer otherBuffer, int options,
!                           BulkInsertState bistate,
                            Buffer *vmbuffer, Buffer *vmbuffer_other);

  #endif   /* HIO_H */

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Formatting Curmudgeons WAS: MMAP Buffers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pl/perl example in the doc no longer works in 9.1