forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8e9ea08
committed
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.com1 parent3fa17d3 commit8e9ea08
File tree
11 files changed
+60
-83
lines changed- contrib/postgres_fdw
- expected
- sql
- doc/src/sgml
- src
- backend
- commands
- replication/logical
- include
- commands
- foreign
11 files changed
+60
-83
lines changedLines changed: 4 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2179 | 2179 |
| |
2180 | 2180 |
| |
2181 | 2181 |
| |
2182 |
| - | |
2183 | 2182 |
| |
2184 | 2183 |
| |
2185 | 2184 |
| |
2186 |
| - | |
2187 |
| - | |
| 2185 | + | |
2188 | 2186 |
| |
2189 | 2187 |
| |
2190 | 2188 |
| |
2191 |
| - | |
| 2189 | + | |
2192 | 2190 |
| |
2193 |
| - | |
2194 |
| - | |
| 2191 | + | |
2195 | 2192 |
| |
2196 |
| - | |
| 2193 | + | |
2197 | 2194 |
| |
2198 |
| - | |
2199 |
| - | |
2200 | 2195 |
| |
2201 | 2196 |
| |
2202 | 2197 |
| |
|
Lines changed: 15 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8218 | 8218 |
| |
8219 | 8219 |
| |
8220 | 8220 |
| |
8221 |
| - | |
8222 | 8221 |
| |
8223 | 8222 |
| |
8224 | 8223 |
| |
8225 | 8224 |
| |
8226 | 8225 |
| |
8227 | 8226 |
| |
| 8227 | + | |
8228 | 8228 |
| |
8229 | 8229 |
| |
8230 | 8230 |
| |
| |||
8364 | 8364 |
| |
8365 | 8365 |
| |
8366 | 8366 |
| |
| 8367 | + | |
| 8368 | + | |
8367 | 8369 |
| |
8368 | 8370 |
| |
8369 | 8371 |
| |
| |||
8388 | 8390 |
| |
8389 | 8391 |
| |
8390 | 8392 |
| |
8391 |
| - | |
8392 |
| - | |
8393 |
| - | |
8394 |
| - | |
8395 |
| - | |
| 8393 | + | |
| 8394 | + | |
| 8395 | + | |
| 8396 | + | |
| 8397 | + | |
| 8398 | + | |
| 8399 | + | |
| 8400 | + | |
8396 | 8401 |
| |
8397 | 8402 |
| |
8398 | 8403 |
| |
8399 |
| - | |
| 8404 | + | |
| 8405 | + | |
8400 | 8406 |
| |
8401 | 8407 |
| |
8402 |
| - | |
| 8408 | + | |
8403 | 8409 |
| |
8404 | 8410 |
| |
8405 | 8411 |
| |
8406 |
| - | |
| 8412 | + | |
8407 | 8413 |
| |
8408 | 8414 |
| |
8409 | 8415 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 |
| - | |
405 | 404 |
| |
406 | 405 |
| |
407 | 406 |
| |
| |||
2881 | 2880 |
| |
2882 | 2881 |
| |
2883 | 2882 |
| |
2884 |
| - | |
2885 | 2883 |
| |
2886 | 2884 |
| |
2887 | 2885 |
| |
| |||
2964 | 2962 |
| |
2965 | 2963 |
| |
2966 | 2964 |
| |
2967 |
| - | |
| 2965 | + | |
2968 | 2966 |
| |
2969 | 2967 |
| |
2970 | 2968 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
212 |
| - | |
213 | 212 |
| |
214 | 213 |
| |
215 | 214 |
| |
|
Lines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2355 | 2355 |
| |
2356 | 2356 |
| |
2357 | 2357 |
| |
2358 |
| - | |
2359 | 2358 |
| |
2360 | 2359 |
| |
2361 | 2360 |
| |
2362 | 2361 |
| |
2363 | 2362 |
| |
2364 | 2363 |
| |
2365 | 2364 |
| |
| 2365 | + | |
2366 | 2366 |
| |
2367 | 2367 |
| |
2368 | 2368 |
| |
| |||
2428 | 2428 |
| |
2429 | 2429 |
| |
2430 | 2430 |
| |
| 2431 | + | |
| 2432 | + | |
2431 | 2433 |
| |
2432 | 2434 |
| |
2433 | 2435 |
| |
| |||
2439 | 2441 |
| |
2440 | 2442 |
| |
2441 | 2443 |
| |
2442 |
| - | |
2443 |
| - | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
2444 | 2449 |
| |
2445 | 2450 |
| |
2446 |
| - | |
| 2451 | + | |
| 2452 | + | |
2447 | 2453 |
| |
2448 |
| - | |
| 2454 | + | |
2449 | 2455 |
| |
2450 | 2456 |
| |
2451 | 2457 |
| |
|
Lines changed: 13 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1071 | 1071 |
| |
1072 | 1072 |
| |
1073 | 1073 |
| |
1074 |
| - | |
1075 |
| - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1076 | 1077 |
| |
1077 | 1078 |
| |
1078 | 1079 |
| |
1079 | 1080 |
| |
1080 | 1081 |
| |
1081 | 1082 |
| |
1082 |
| - | |
1083 |
| - | |
1084 |
| - | |
1085 |
| - | |
1086 |
| - | |
1087 |
| - | |
1088 |
| - | |
1089 |
| - | |
1090 |
| - | |
1091 |
| - | |
1092 |
| - | |
1093 |
| - | |
1094 |
| - | |
1095 |
| - | |
| 1083 | + | |
1096 | 1084 |
| |
1097 | 1085 |
| |
1098 | 1086 |
| |
| |||
1111 | 1099 |
| |
1112 | 1100 |
| |
1113 | 1101 |
| |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1114 | 1111 |
| |
1115 | 1112 |
| |
1116 | 1113 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
72 | 79 |
| |
73 | 80 |
| |
74 | 81 |
| |
|
Lines changed: 9 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
326 |
| - | |
327 | 326 |
| |
328 | 327 |
| |
329 | 328 |
| |
| |||
1620 | 1619 |
| |
1621 | 1620 |
| |
1622 | 1621 |
| |
1623 |
| - | |
1624 | 1622 |
| |
1625 | 1623 |
| |
1626 | 1624 |
| |
| |||
1654 | 1652 |
| |
1655 | 1653 |
| |
1656 | 1654 |
| |
1657 |
| - | |
1658 |
| - | |
1659 |
| - | |
| 1655 | + | |
1660 | 1656 |
| |
1661 | 1657 |
| |
1662 | 1658 |
| |
| |||
1704 | 1700 |
| |
1705 | 1701 |
| |
1706 | 1702 |
| |
1707 |
| - | |
1708 |
| - | |
| 1703 | + | |
1709 | 1704 |
| |
1710 | 1705 |
| |
1711 | 1706 |
| |
| |||
1718 | 1713 |
| |
1719 | 1714 |
| |
1720 | 1715 |
| |
1721 |
| - | |
| 1716 | + | |
1722 | 1717 |
| |
1723 | 1718 |
| |
1724 | 1719 |
| |
| |||
1739 | 1734 |
| |
1740 | 1735 |
| |
1741 | 1736 |
| |
1742 |
| - | |
1743 |
| - | |
1744 |
| - | |
1745 |
| - | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1746 | 1740 |
| |
1747 | 1741 |
| |
1748 | 1742 |
| |
1749 | 1743 |
| |
1750 |
| - | |
1751 | 1744 |
| |
1752 | 1745 |
| |
1753 | 1746 |
| |
| |||
1760 | 1753 |
| |
1761 | 1754 |
| |
1762 | 1755 |
| |
1763 |
| - | |
1764 |
| - | |
1765 | 1756 |
| |
1766 | 1757 |
| |
1767 | 1758 |
| |
| |||
1799 | 1790 |
| |
1800 | 1791 |
| |
1801 | 1792 |
| |
1802 |
| - | |
1803 |
| - | |
| 1793 | + | |
1804 | 1794 |
| |
1805 | 1795 |
| |
1806 | 1796 |
| |
| |||
1901 | 1891 |
| |
1902 | 1892 |
| |
1903 | 1893 |
| |
1904 |
| - | |
1905 |
| - | |
| 1894 | + | |
1906 | 1895 |
| |
1907 |
| - | |
1908 |
| - | |
| 1896 | + | |
1909 | 1897 |
| |
1910 | 1898 |
| |
1911 | 1899 |
| |
| |||
1952 | 1940 |
| |
1953 | 1941 |
| |
1954 | 1942 |
| |
1955 |
| - | |
1956 | 1943 |
| |
1957 | 1944 |
| |
1958 | 1945 |
| |
1959 | 1946 |
| |
1960 | 1947 |
| |
1961 | 1948 |
| |
1962 | 1949 |
| |
1963 |
| - | |
1964 | 1950 |
| |
1965 | 1951 |
| |
1966 | 1952 |
| |
| |||
2044 | 2030 |
| |
2045 | 2031 |
| |
2046 | 2032 |
| |
2047 |
| - | |
2048 | 2033 |
| |
2049 | 2034 |
| |
2050 | 2035 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1816 | 1816 |
| |
1817 | 1817 |
| |
1818 | 1818 |
| |
1819 |
| - | |
1820 | 1819 |
| |
1821 | 1820 |
| |
1822 | 1821 |
| |
| |||
1846 | 1845 |
| |
1847 | 1846 |
| |
1848 | 1847 |
| |
1849 |
| - | |
1850 | 1848 |
| |
1851 | 1849 |
| |
1852 | 1850 |
| |
| |||
1885 | 1883 |
| |
1886 | 1884 |
| |
1887 | 1885 |
| |
1888 |
| - | |
1889 | 1886 |
| |
1890 | 1887 |
| |
1891 | 1888 |
| |
| |||
1900 | 1897 |
| |
1901 | 1898 |
| |
1902 | 1899 |
| |
1903 |
| - | |
1904 | 1900 |
| |
1905 | 1901 |
| |
1906 | 1902 |
| |
|
0 commit comments
Comments
(0)