You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper.
Commit8ff1c94 allowed TRUNCATE command to truncate foreign tables.Previously the information about "ONLY" options specified in TRUNCATEcommand were passed to the foreign data wrapper. Then postgres_fdwconstructed the TRUNCATE command to issue the remote server andincluded "ONLY" options in it based on the passed information.On the other hand, "ONLY" options specified in SELECT, UPDATE or DELETEhave no effect when accessing or modifying the remote table, i.e.,are not passed to the foreign data wrapper. So it's inconsistent tomake only TRUNCATE command pass the "ONLY" options to the foreign datawrapper. Therefore this commit changes the TRUNCATE command so thatit doesn't pass the "ONLY" options to the foreign data wrapper,for the consistency with other statements. Also this commit changespostgres_fdw so that it always doesn't include "ONLY" options inthe TRUNCATE command that it constructs.Author: Fujii MasaoReviewed-by: Bharath Rupireddy, Kyotaro Horiguchi, Justin Pryzby, Zhihong YuDiscussion:https://postgr.es/m/551ed8c1-f531-818b-664a-2cecdab99cd8@oss.nttdata.com