Update types in File API
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 8 Dec 2022 07:51:38 +0000 (08:51 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 8 Dec 2022 07:58:15 +0000 (08:58 +0100)
commit2d4f1ba6cfc2f0a977f1c30bda9848041343e248
tree8fdfef3464578531b8f83b4921fa3b3d5f6dd5dd
parent4b3e37993254ed098219e62ceffb1b32fac388cb
Update types in File API

Make the argument types of the File API match stdio better:

- Change the data buffer to void *, from char *.
- Change FileWrite() data buffer to const on top of that.
- Change amounts to size_t, from int.

In passing, change the FilePrefetch() amount argument from int to
off_t, to match the underlying posix_fadvise().

Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-e168b1ce4bdb%40enterprisedb.com
src/backend/storage/file/fd.c
src/include/storage/fd.h