Movatterモバイル変換


[0]ホーム

URL:


Quick Links

[PATCH] Remove workarounds to format [u]int64's

From:Aleksander Alekseev <aleksander(at)timescale(dot)com>
To:PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc:Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject:[PATCH] Remove workarounds to format [u]int64's
Date:2022-03-21 08:52:14
Message-ID:CAJ7c6TMSKi3Xs8h5MP38XOnQQpBLazJvVxVfPn++roitDJcR7g@mail.gmail.com
Views:Whole Thread |Raw Message |Download mbox |Resend email
Thread:
Lists:pgsql-hackers

Hi hackers,

I learned from Tom [1] that we can simplify the code like:

```
char buff[32];
snprintf(buf, sizeof(buf), INT64_FORMAT, ...)
ereport(WARNING, (errmsg("%s ...", buf)));
```

... and rely on %lld/%llu now as long as we explicitly cast the
argument to long long int / unsigned long long. This was previously
addressed in 6a1cd8b9 and d914eb34, but I see more places where we
still use an old approach.

Suggested patch fixes this. Tested locally - no warnings; passes all the tests.

[1]https://www.postgresql.org/message-id/771048.1647528068%40sss.pgh.pa.us

--
Best regards,
Aleksander Alekseev

AttachmentContent-TypeSize
v1-0001-Remove-workarounds-to-format-u-int64-s.patchapplication/octet-stream11.8 KB

Responses

Browse pgsql-hackers by date

 FromDateSubject
Next MessagePavel Borisov2022-03-21 09:12:33Re: [PATCH] Remove workarounds to format [u]int64's
Previous MessageJulien Rouhaud2022-03-21 08:29:16Re: WIP: WAL prefetch (another approach)

[8]ページ先頭

©2009-2026 Movatter.jp