mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add regression test for TRUNCATE on foreign table not supporting TRUNCATE.
file_fdw doesn't support INSERT, UPDATE, DELETE and TRUNCATE. It has the regression test that confirms that INSERT, UPDATE and DELETE fail on its foreign table, but not TRUNCATE yet. It's better to also test TRUNCATE fails on a foreign table not allowing TRUNCATE, for test coverage. This commit adds that regression test using file_fdw. Author: Yugo Nagata Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/20220630104812.ec1556481452c019874f4ac9@sraoss.co.jp
This commit is contained in:
@ -246,6 +246,8 @@ UPDATE agg_csv SET a = 1;
|
||||
ERROR: cannot update foreign table "agg_csv"
|
||||
DELETE FROM agg_csv WHERE a = 100;
|
||||
ERROR: cannot delete from foreign table "agg_csv"
|
||||
TRUNCATE agg_csv;
|
||||
ERROR: cannot truncate foreign table "agg_csv"
|
||||
-- but this should be allowed
|
||||
SELECT * FROM agg_csv FOR UPDATE;
|
||||
a | b
|
||||
|
Reference in New Issue
Block a user