postgresql/src/backend
Fujii Masao 8e9ea08bae Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper.
Commit 8ff1c94649 allowed TRUNCATE command to truncate foreign tables.
Previously the information about "ONLY" options specified in TRUNCATE
command were passed to the foreign data wrapper. Then postgres_fdw
constructed the TRUNCATE command to issue the remote server and
included "ONLY" options in it based on the passed information.

On the other hand, "ONLY" options specified in SELECT, UPDATE or DELETE
have no effect when accessing or modifying the remote table, i.e.,
are not passed to the foreign data wrapper. So it's inconsistent to
make only TRUNCATE command pass the "ONLY" options to the foreign data
wrapper. Therefore this commit changes the TRUNCATE command so that
it doesn't pass the "ONLY" options to the foreign data wrapper,
for the consistency with other statements. Also this commit changes
postgres_fdw so that it always doesn't include "ONLY" options in
the TRUNCATE command that it constructs.

Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Kyotaro Horiguchi, Justin Pryzby, Zhihong Yu
Discussion: https://postgr.es/m/551ed8c1-f531-818b-664a-2cecdab99cd8@oss.nttdata.com
2021-04-27 14:41:27 +09:00
..
access Add some forgotten LSN_FORMAT_ARGS() in xlogreader.c 2021-04-24 09:09:02 +09:00
bootstrap Split backend status and progress related functionality out of pgstat.c. 2021-04-03 11:42:52 -07:00
catalog Use HTAB for replication slot statistics. 2021-04-27 09:09:11 +05:30
commands Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper. 2021-04-27 14:41:27 +09:00
executor Fix come comments in execMain.c 2021-04-24 15:07:04 +09:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Speedup ScalarArrayOpExpr evaluation 2021-04-08 23:51:22 +12:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Factor out system call names from error messages 2021-04-23 14:21:37 +02:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Improve slightly misleading comments in nodeFuncs.c 2021-04-10 19:19:45 +12:00
optimizer Fix relcache inconsistency hazard in partition detach 2021-04-22 15:13:25 -04:00
parser Reorder COMPRESSION option in gram.y and parsenodes.h into alphabetical order. 2021-04-23 19:10:24 +09:00
partitioning Fix uninitialized memory bug 2021-04-22 16:04:48 -04:00
po Translation updates 2020-05-18 12:49:30 +02:00
port Use correct format placeholder for WSAGetLastError() 2021-04-23 14:21:37 +02:00
postmaster Use HTAB for replication slot statistics. 2021-04-27 09:09:11 +05:30
regex Further tweak memory management for regex DFAs. 2021-03-08 16:32:29 -05:00
replication Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper. 2021-04-27 14:41:27 +09:00
rewrite Remove rewriteTargetListIU's expansion of view targetlists in UPDATE. 2021-04-26 13:58:00 -04:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Fix typos and grammar in comments and docs 2021-04-19 11:32:30 +09:00
storage Factor out system call names from error messages 2021-04-23 14:21:37 +02:00
tcop adjust query id feature to use pg_stat_activity.query_id 2021-04-20 12:22:26 -04:00
tsearch Fix typos and grammar in comments and docs 2021-04-19 11:32:30 +09:00
utils Use HTAB for replication slot statistics. 2021-04-27 09:09:11 +05:30
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00