Re: Infinite Interval

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Infinite Interval
Дата
Msg-id 557406.1679169334@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Ответы Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Список pgsql-hackers
Joseph Koshakow <koshy44@gmail.com> writes:
> On Sat, Mar 18, 2023 at 3:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> More specifically, those are from running pg_indent with an obsolete
>> typedefs list.

> I must be doing something wrong because even after doing that I get the
> same strange formatting. Specifically from the root directory I ran

Hmm, I dunno what's going on there.  When I do this:

>   curl https://buildfarm.postgresql.org/cgi-bin/typedefs.pl -o
> src/tools/pgindent/typedefs.list

I end up with a plausible set of updates, notably

$ git diff
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 097f42e1b3..667f8e13ed 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
...
@@ -545,10 +548,12 @@ DataDumperPtr
 DataPageDeleteStack
 DatabaseInfo
 DateADT
+DateTimeErrorExtra
 Datum
 DatumTupleFields
 DbInfo
 DbInfoArr
+DbLocaleInfo
 DeClonePtrType
 DeadLockState
 DeallocateStmt

so it sure ought to know DateTimeErrorExtra is a typedef.
I then tried pgindent'ing datetime.c and timestamp.c,
and it did not want to change either file.  I do get
diffs like

 DecodeDateTime(char **field, int *ftype, int nf,
               int *dtype, struct pg_tm *tm, fsec_t *fsec, int *tzp,
-              DateTimeErrorExtra *extra)
+              DateTimeErrorExtra * extra)
 {
    int         fmask = 0,

if I try to pgindent datetime.c with typedefs.list as it
stands in HEAD.  That's pretty much pgindent's normal
behavior when it doesn't recognize a name as a typedef.

            regards, tom lane



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: possibility to read dumped table's name from file
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Commitfest 2023-03 starting tomorrow!