git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: fd96d14) | patch
Support pg_read_[binary_]file (filename, missing_ok).
2022年7月29日 19:38:49 +0000 (15:38 -0400)
2022年7月29日 19:38:49 +0000 (15:38 -0400)
commit 283129e325b721a5a62227f20d7e3d149b379c73
Support pg_read_[binary_]file (filename, missing_ok).

There wasn't an especially nice way to read all of a file while
passing missing_ok = true. Add an additional overloaded variant
to support that use-case.

While here, refactor the C code to avoid a rats-nest of PG_NARGS
checks, instead handling the argument collection in the outer
wrapper functions. It's a bit longer this way, but far more
straightforward.

(Upon looking at the code coverage report for genfile.c, I was
impelled to also add a test case for pg_stat_file() -- tgl)

Kyotaro Horiguchi

Discussion: https://postgr.es/m/20220607.160520.1984541900138970018.horikyota.ntt@gmail.com
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/catalog/system_functions.sql diff | blob | blame | history
src/backend/utils/adt/genfile.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/test/regress/expected/misc_functions.out diff | blob | blame | history
src/test/regress/sql/misc_functions.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /