Re: Infinite Interval

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Koshakow <koshy44(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "Gregory Stark (as CFM)" <stark(dot)cfm(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Infinite Interval
Date: 2023-03-18 19:55:34
Message-ID: 557406.1679169334@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joseph Koshakow <koshy44(at)gmail(dot)com> writes:
> On Sat, Mar 18, 2023 at 3:08 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-03-18 20:26:42 Re: Commitfest 2023-03 starting tomorrow!
Previous Message Pavel Stehule 2023-03-18 19:48:33 Re: proposal: possibility to read dumped table's name from file