postgresql/src/include
Peter Eisentraut 20428d344a Add BufFileRead variants with short read and EOF detection
Most callers of BufFileRead() want to check whether they read the full
specified length.  Checking this at every call site is very tedious.
This patch provides additional variants BufFileReadExact() and
BufFileReadMaybeEOF() that include the length checks.

I considered changing BufFileRead() itself, but this function is also
used in extensions, and so changing the behavior like this would
create a lot of problems there.  The new names are analogous to the
existing LogicalTapeReadExact().

Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/f3501945-c591-8cc3-5ef0-b72a2e0eaa9c@enterprisedb.com
2023-01-16 11:01:31 +01:00
..
access Refactor code in charge of running shell-based recovery commands 2023-01-16 16:31:43 +09:00
backup Update copyright for 2023 2023-01-02 15:00:37 -05:00
bootstrap Update copyright for 2023 2023-01-02 15:00:37 -05:00
catalog Ignore dropped and generated columns from the column list. 2023-01-13 14:49:23 +05:30
commands Fix MAINTAIN privileges for toast tables and partitions. 2023-01-14 00:16:23 -08:00
common Common function for percent placeholder replacement 2023-01-11 10:42:35 +01:00
datatype Update copyright for 2023 2023-01-02 15:00:37 -05:00
executor Make new GENERATED-expressions code more bulletproof. 2023-01-15 13:14:52 -05:00
fe_utils Update copyright for 2023 2023-01-02 15:00:37 -05:00
foreign Update copyright for 2023 2023-01-02 15:00:37 -05:00
jit Update copyright for 2023 2023-01-02 15:00:37 -05:00
lib Constify the arguments of ilist.c/h functions 2023-01-12 08:00:51 +01:00
libpq Store IdentLine->pg_user as an AuthToken 2023-01-16 13:58:07 +09:00
mb Update copyright for 2023 2023-01-02 15:00:37 -05:00
nodes Revert "Get rid of the "new" and "old" entries in a view's rangetable." 2023-01-11 23:01:22 -05:00
optimizer Fix calculation of which GENERATED columns need to be updated. 2023-01-05 14:12:17 -05:00
parser Update copyright for 2023 2023-01-02 15:00:37 -05:00
partitioning Update copyright for 2023 2023-01-02 15:00:37 -05:00
pch Update copyright for 2023 2023-01-02 15:00:37 -05:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
portability Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Update copyright for 2023 2023-01-02 15:00:37 -05:00
regex Update copyright for 2023 2023-01-02 15:00:37 -05:00
replication Perform apply of large transactions by parallel workers. 2023-01-09 07:52:45 +05:30
rewrite Fix calculation of which GENERATED columns need to be updated. 2023-01-05 14:12:17 -05:00
snowball Update copyright for 2023 2023-01-02 15:00:37 -05:00
statistics Update copyright for 2023 2023-01-02 15:00:37 -05:00
storage Add BufFileRead variants with short read and EOF detection 2023-01-16 11:01:31 +01:00
tcop Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsearch Update copyright for 2023 2023-01-02 15:00:37 -05:00
utils Manual cleanup and pgindent of pgstat and bufmgr related code 2023-01-13 15:23:17 -08:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
fmgr.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
funcapi.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
getopt_long.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
Makefile Move gramparse.h to src/backend/parser 2022-09-14 10:57:13 +07:00
meson.build New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
miscadmin.h Use WaitEventSet API for postmaster's event loop. 2023-01-12 16:32:20 +13:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_config.h.in Remove configure probe for sockaddr_in6 and require AF_INET6. 2022-08-26 10:18:30 +12:00
pg_getopt.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_trace.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgstat.h Manual cleanup and pgindent of pgstat and bufmgr related code 2023-01-13 15:23:17 -08:00
pgtar.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgtime.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
port.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
postgres.h New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
varatt.h New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
windowapi.h Update copyright for 2023 2023-01-02 15:00:37 -05:00