Skip to content

Commit 573f0c4

Browse files
committed
Fix returning tests
1 parent 9257943 commit 573f0c4

5 files changed

Lines changed: 75 additions & 21 deletions

File tree

expected/13.15/extra/returning.out

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPTIONS (database '/tmp/sqlite_fdw_test/common.db');
88
--Testcase 03:
99
CREATE SERVER sqlite2 FOREIGN DATA WRAPPER sqlite_fdw;
1010
--Testcase 04:
11-
IMPORT FOREIGN SCHEMA main FROM SERVER sqlite_svr INTO public;
11+
IMPORT FOREIGN SCHEMA main EXCEPT ("types_PostGIS") FROM SERVER sqlite_svr INTO public;
1212
--Testcase 05:
1313
SELECT * FROM "type_STRING";
1414
col
@@ -143,7 +143,7 @@ INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNIN
143143
ERROR: RETURNING clause is not supported
144144
--Testcase 37:
145145
EXPLAIN (VERBOSE, COSTS OFF)
146-
INSERT INTO "type_STRING"(col) VALUES ('string') RETURNING *;
146+
INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNING *;
147147
ERROR: RETURNING clause is not supported
148148
--Testcase 38:
149149
INSERT INTO "type_BYTE"(col) VALUES ('c') RETURNING *;
@@ -499,9 +499,24 @@ ALTER TABLE inserttest01 ALTER COLUMN col1 OPTIONS (ADD key 'true');
499499
--Testcase 139:
500500
DELETE FROM inserttest01 RETURNING *;
501501
ERROR: RETURNING clause is not supported
502+
--Testcase 140:
503+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
504+
--Testcase 141:
505+
EXPLAIN (VERBOSE, COSTS OFF)
506+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
507+
QUERY PLAN
508+
-------------------------------------
509+
Insert on public."type_STRING"
510+
Conflict Resolution: NOTHING
511+
-> Result
512+
Output: 'string_ocdn'::text
513+
(4 rows)
514+
515+
--Testcase 142:
516+
DELETE FROM "type_STRING";
502517
--Testcase 200:
503518
DROP EXTENSION sqlite_fdw CASCADE;
504-
NOTICE: drop cascades to 65 other objects
519+
NOTICE: drop cascades to 64 other objects
505520
DETAIL: drop cascades to server sqlite_svr
506521
drop cascades to foreign table department
507522
drop cascades to foreign table employee
@@ -536,7 +551,6 @@ drop cascades to foreign table "type_MACADDRpk"
536551
drop cascades to foreign table "type_MACADDR"
537552
drop cascades to foreign table "type_MACADDR8pk"
538553
drop cascades to foreign table "type_MACADDR8"
539-
drop cascades to foreign table "types_PostGIS"
540554
drop cascades to foreign table "type_JSON"
541555
drop cascades to foreign table "type_JSONB"
542556
drop cascades to foreign table "BitT"

expected/14.12/extra/returning.out

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPTIONS (database '/tmp/sqlite_fdw_test/common.db');
88
--Testcase 03:
99
CREATE SERVER sqlite2 FOREIGN DATA WRAPPER sqlite_fdw;
1010
--Testcase 04:
11-
IMPORT FOREIGN SCHEMA main FROM SERVER sqlite_svr INTO public;
11+
IMPORT FOREIGN SCHEMA main EXCEPT ("types_PostGIS") FROM SERVER sqlite_svr INTO public;
1212
--Testcase 05:
1313
SELECT * FROM "type_STRING";
1414
col
@@ -143,7 +143,7 @@ INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNIN
143143
ERROR: RETURNING clause is not supported
144144
--Testcase 37:
145145
EXPLAIN (VERBOSE, COSTS OFF)
146-
INSERT INTO "type_STRING"(col) VALUES ('string') RETURNING *;
146+
INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNING *;
147147
ERROR: RETURNING clause is not supported
148148
--Testcase 38:
149149
INSERT INTO "type_BYTE"(col) VALUES ('c') RETURNING *;
@@ -499,9 +499,24 @@ ALTER TABLE inserttest01 ALTER COLUMN col1 OPTIONS (ADD key 'true');
499499
--Testcase 139:
500500
DELETE FROM inserttest01 RETURNING *;
501501
ERROR: RETURNING clause is not supported
502+
--Testcase 140:
503+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
504+
--Testcase 141:
505+
EXPLAIN (VERBOSE, COSTS OFF)
506+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
507+
QUERY PLAN
508+
-------------------------------------
509+
Insert on public."type_STRING"
510+
Conflict Resolution: NOTHING
511+
-> Result
512+
Output: 'string_ocdn'::text
513+
(4 rows)
514+
515+
--Testcase 142:
516+
DELETE FROM "type_STRING";
502517
--Testcase 200:
503518
DROP EXTENSION sqlite_fdw CASCADE;
504-
NOTICE: drop cascades to 65 other objects
519+
NOTICE: drop cascades to 64 other objects
505520
DETAIL: drop cascades to server sqlite_svr
506521
drop cascades to foreign table department
507522
drop cascades to foreign table employee
@@ -536,7 +551,6 @@ drop cascades to foreign table "type_MACADDRpk"
536551
drop cascades to foreign table "type_MACADDR"
537552
drop cascades to foreign table "type_MACADDR8pk"
538553
drop cascades to foreign table "type_MACADDR8"
539-
drop cascades to foreign table "types_PostGIS"
540554
drop cascades to foreign table "type_JSON"
541555
drop cascades to foreign table "type_JSONB"
542556
drop cascades to foreign table "BitT"

expected/15.7/extra/returning.out

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPTIONS (database '/tmp/sqlite_fdw_test/common.db');
88
--Testcase 03:
99
CREATE SERVER sqlite2 FOREIGN DATA WRAPPER sqlite_fdw;
1010
--Testcase 04:
11-
IMPORT FOREIGN SCHEMA main FROM SERVER sqlite_svr INTO public;
11+
IMPORT FOREIGN SCHEMA main EXCEPT ("types_PostGIS") FROM SERVER sqlite_svr INTO public;
1212
--Testcase 05:
1313
SELECT * FROM "type_STRING";
1414
col
@@ -143,7 +143,7 @@ INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNIN
143143
ERROR: RETURNING clause is not supported
144144
--Testcase 37:
145145
EXPLAIN (VERBOSE, COSTS OFF)
146-
INSERT INTO "type_STRING"(col) VALUES ('string') RETURNING *;
146+
INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNING *;
147147
ERROR: RETURNING clause is not supported
148148
--Testcase 38:
149149
INSERT INTO "type_BYTE"(col) VALUES ('c') RETURNING *;
@@ -499,9 +499,24 @@ ALTER TABLE inserttest01 ALTER COLUMN col1 OPTIONS (ADD key 'true');
499499
--Testcase 139:
500500
DELETE FROM inserttest01 RETURNING *;
501501
ERROR: RETURNING clause is not supported
502+
--Testcase 140:
503+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
504+
--Testcase 141:
505+
EXPLAIN (VERBOSE, COSTS OFF)
506+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
507+
QUERY PLAN
508+
-------------------------------------
509+
Insert on public."type_STRING"
510+
Conflict Resolution: NOTHING
511+
-> Result
512+
Output: 'string_ocdn'::text
513+
(4 rows)
514+
515+
--Testcase 142:
516+
DELETE FROM "type_STRING";
502517
--Testcase 200:
503518
DROP EXTENSION sqlite_fdw CASCADE;
504-
NOTICE: drop cascades to 65 other objects
519+
NOTICE: drop cascades to 64 other objects
505520
DETAIL: drop cascades to server sqlite_svr
506521
drop cascades to foreign table department
507522
drop cascades to foreign table employee
@@ -536,7 +551,6 @@ drop cascades to foreign table "type_MACADDRpk"
536551
drop cascades to foreign table "type_MACADDR"
537552
drop cascades to foreign table "type_MACADDR8pk"
538553
drop cascades to foreign table "type_MACADDR8"
539-
drop cascades to foreign table "types_PostGIS"
540554
drop cascades to foreign table "type_JSON"
541555
drop cascades to foreign table "type_JSONB"
542556
drop cascades to foreign table "BitT"

expected/16.3/extra/returning.out

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPTIONS (database '/tmp/sqlite_fdw_test/common.db');
88
--Testcase 03:
99
CREATE SERVER sqlite2 FOREIGN DATA WRAPPER sqlite_fdw;
1010
--Testcase 04:
11-
IMPORT FOREIGN SCHEMA main FROM SERVER sqlite_svr INTO public;
11+
IMPORT FOREIGN SCHEMA main EXCEPT ("types_PostGIS") FROM SERVER sqlite_svr INTO public;
1212
--Testcase 05:
1313
SELECT * FROM "type_STRING";
1414
col
@@ -143,7 +143,7 @@ INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNIN
143143
ERROR: RETURNING clause is not supported
144144
--Testcase 37:
145145
EXPLAIN (VERBOSE, COSTS OFF)
146-
INSERT INTO "type_STRING"(col) VALUES ('string') RETURNING *;
146+
INSERT INTO "type_STRING"(col) VALUES ('string') ON CONFLICT DO NOTHING RETURNING *;
147147
ERROR: RETURNING clause is not supported
148148
--Testcase 38:
149149
INSERT INTO "type_BYTE"(col) VALUES ('c') RETURNING *;
@@ -499,9 +499,24 @@ ALTER TABLE inserttest01 ALTER COLUMN col1 OPTIONS (ADD key 'true');
499499
--Testcase 139:
500500
DELETE FROM inserttest01 RETURNING *;
501501
ERROR: RETURNING clause is not supported
502+
--Testcase 140:
503+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
504+
--Testcase 141:
505+
EXPLAIN (VERBOSE, COSTS OFF)
506+
INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
507+
QUERY PLAN
508+
-------------------------------------
509+
Insert on public."type_STRING"
510+
Conflict Resolution: NOTHING
511+
-> Result
512+
Output: 'string_ocdn'::text
513+
(4 rows)
514+
515+
--Testcase 142:
516+
DELETE FROM "type_STRING";
502517
--Testcase 200:
503518
DROP EXTENSION sqlite_fdw CASCADE;
504-
NOTICE: drop cascades to 65 other objects
519+
NOTICE: drop cascades to 64 other objects
505520
DETAIL: drop cascades to server sqlite_svr
506521
drop cascades to foreign table department
507522
drop cascades to foreign table employee
@@ -536,7 +551,6 @@ drop cascades to foreign table "type_MACADDRpk"
536551
drop cascades to foreign table "type_MACADDR"
537552
drop cascades to foreign table "type_MACADDR8pk"
538553
drop cascades to foreign table "type_MACADDR8"
539-
drop cascades to foreign table "types_PostGIS"
540554
drop cascades to foreign table "type_JSON"
541555
drop cascades to foreign table "type_JSONB"
542556
drop cascades to foreign table "BitT"

expected/17.0/extra/returning.out

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPTIONS (database '/tmp/sqlite_fdw_test/common.db');
88
--Testcase 03:
99
CREATE SERVER sqlite2 FOREIGN DATA WRAPPER sqlite_fdw;
1010
--Testcase 04:
11-
IMPORT FOREIGN SCHEMA main FROM SERVER sqlite_svr INTO public;
11+
IMPORT FOREIGN SCHEMA main EXCEPT ("types_PostGIS") FROM SERVER sqlite_svr INTO public;
1212
--Testcase 05:
1313
SELECT * FROM "type_STRING";
1414
col
@@ -507,17 +507,16 @@ INSERT INTO "type_STRING"(col) VALUES ('string_ocdn') ON CONFLICT DO NOTHING;
507507
QUERY PLAN
508508
-------------------------------------
509509
Insert on public."type_STRING"
510-
Batch Size: 1
511510
Conflict Resolution: NOTHING
512511
-> Result
513512
Output: 'string_ocdn'::text
514-
(5 rows)
513+
(4 rows)
515514

516515
--Testcase 142:
517516
DELETE FROM "type_STRING";
518517
--Testcase 200:
519518
DROP EXTENSION sqlite_fdw CASCADE;
520-
NOTICE: drop cascades to 65 other objects
519+
NOTICE: drop cascades to 64 other objects
521520
DETAIL: drop cascades to server sqlite_svr
522521
drop cascades to foreign table department
523522
drop cascades to foreign table employee
@@ -552,7 +551,6 @@ drop cascades to foreign table "type_MACADDRpk"
552551
drop cascades to foreign table "type_MACADDR"
553552
drop cascades to foreign table "type_MACADDR8pk"
554553
drop cascades to foreign table "type_MACADDR8"
555-
drop cascades to foreign table "types_PostGIS"
556554
drop cascades to foreign table "type_JSON"
557555
drop cascades to foreign table "type_JSONB"
558556
drop cascades to foreign table "BitT"

0 commit comments

Comments
 (0)