Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecc84b9

Browse files
committed
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 DELETEfail on its foreign table, but not TRUNCATE yet. It's better toalso test TRUNCATE fails on a foreign table not allowing TRUNCATE,for test coverage. This commit adds that regression test using file_fdw.Author: Yugo NagataReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/20220630104812.ec1556481452c019874f4ac9@sraoss.co.jp
1 parent13d8388 commitecc84b9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

‎contrib/file_fdw/expected/file_fdw.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ UPDATE agg_csv SET a = 1;
246246
ERROR: cannot update foreign table "agg_csv"
247247
DELETE FROM agg_csv WHERE a = 100;
248248
ERROR: cannot delete from foreign table "agg_csv"
249+
TRUNCATE agg_csv;
250+
ERROR: cannot truncate foreign table "agg_csv"
249251
-- but this should be allowed
250252
SELECT * FROM agg_csv FOR UPDATE;
251253
a | b

‎contrib/file_fdw/sql/file_fdw.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ SELECT tableoid::regclass, b FROM agg_csv;
166166
INSERT INTO agg_csvVALUES(1,2.0);
167167
UPDATE agg_csvSET a=1;
168168
DELETEFROM agg_csvWHERE a=100;
169+
TRUNCATE agg_csv;
169170
-- but this should be allowed
170171
SELECT*FROM agg_csv FORUPDATE;
171172

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp