postgresql/src/tools
Fujii Masao 8ff1c94649 Allow TRUNCATE command to truncate foreign tables.
This commit introduces new foreign data wrapper API for TRUNCATE.
It extends TRUNCATE command so that it accepts foreign tables as
the targets to truncate and invokes that API. Also it extends postgres_fdw
so that it can issue TRUNCATE command to foreign servers, by adding
new routine for that TRUNCATE API.

The information about options specified in TRUNCATE command, e.g.,
ONLY, CACADE, etc is passed to FDW via API. The list of foreign tables to
truncate is also passed to FDW. FDW truncates the foreign data sources
that the passed foreign tables specify, based on those information.
For example, postgres_fdw constructs TRUNCATE command using them
and issues it to the foreign server.

For performance, TRUNCATE command invokes the FDW routine for
TRUNCATE once per foreign server that foreign tables to truncate belong to.

Author: Kazutaka Onishi, Kohei KaiGai, slightly modified by Fujii Masao
Reviewed-by: Bharath Rupireddy, Michael Paquier, Zhihong Yu, Alvaro Herrera, Stephen Frost, Ashutosh Bapat, Amit Langote, Daniel Gustafsson, Ibrar Ahmed, Fujii Masao
Discussion: https://postgr.es/m/CAOP8fzb_gkReLput7OvOK+8NHgw-RKqNv59vem7=524krQTcWA@mail.gmail.com
Discussion: https://postgr.es/m/CAJuF6cMWDDqU-vn_knZgma+2GMaout68YUgn1uyDnexRhqqM5Q@mail.gmail.com
2021-04-08 20:56:08 +09:00
..
editors Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
ifaddrs Update copyright for 2021 2021-01-02 13:06:25 -05:00
msvc Refactor HMAC implementations 2021-04-03 17:30:49 +09:00
perlcheck Stop requiring an explicit return from perl subroutines 2020-04-14 16:55:34 -04:00
pginclude Replace remaining uses of "whitelist". 2021-01-05 14:00:16 +13:00
pgindent Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
codelines Fix remaining stray references to CVS. 2010-09-22 19:51:39 -04:00
copyright.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
find_badmacros Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
find_static Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
gen_keywordlist.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
git-external-diff Preserve information on use of git-external-diff 2018-05-24 23:45:31 +09:30
git_changelog Stamp HEAD as 14devel. 2020-06-07 17:16:30 -04:00
make_ctags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_etags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_mkid Add another pgdefine path check, and a cvs-git change. 2011-08-26 21:52:35 -04:00
PerfectHash.pm Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgtest pgtest: run clean, build, and check stages separately 2018-07-28 15:34:06 -04:00
RELEASE_CHANGES Retire findoidjoins. 2021-02-02 17:21:37 -05:00
testint128.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
valgrind.supp Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms. 2020-06-08 19:52:19 -07:00
version_stamp.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
win32tzlist.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00