Merge large_object.sql test into largeobject.source.
authorTom Lane <[email protected]>
Mon, 17 Jul 2017 19:28:17 +0000 (15:28 -0400)
committerTom Lane <[email protected]>
Mon, 17 Jul 2017 19:28:17 +0000 (15:28 -0400)
It seems pretty confusing to have tests named both largeobject and
large_object.  The latter is of very recent vintage (commit ff992c074),
so get rid of it in favor of merging into the former.

Also, enable the LO comment test that was added by commit 70ad7ed4e,
since the later commit added the then-missing pg_upgrade functionality.
The large_object.sql test case is almost completely redundant with that,
but not quite: it seems like creating a user-defined LO with an OID in
the system range might be an interesting case for pg_upgrade, so let's
keep it.

Like the earlier patch, back-patch to all supported branches.

Discussion: https://postgr.es/m/18665.1500306372@sss.pgh.pa.us

src/test/regress/expected/large_object.out [deleted file]
src/test/regress/input/largeobject.source
src/test/regress/output/largeobject.source
src/test/regress/output/largeobject_1.source
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/large_object.sql [deleted file]

diff --git a/src/test/regress/expected/large_object.out b/src/test/regress/expected/large_object.out
deleted file mode 100644 (file)
index b00d47c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
--- This is more-or-less DROP IF EXISTS LARGE OBJECT 3001;
-WITH unlink AS (SELECT lo_unlink(loid) FROM pg_largeobject WHERE loid = 3001) SELECT 1;
- ?column? 
-----------
-        1
-(1 row)
-
--- Test creation of a large object and leave it for testing pg_upgrade
-SELECT lo_create(3001);
- lo_create 
------------
-      3001
-(1 row)
-
-COMMENT ON LARGE OBJECT 3001 IS 'testing comments';
index 5b6f9c0186bfab215adcb3c04a35773ff6bc28d3..2f1b26caa8a6da0b4f5793a6cf288c5e384f1e11 100644 (file)
@@ -170,4 +170,11 @@ SELECT pageno, data FROM pg_largeobject WHERE loid = :newloid;
 SELECT lo_unlink(loid) FROM lotest_stash_values;
 \lo_unlink :newloid
 
-TRUNCATE lotest_stash_values;
+-- Create one more object that we leave behind for testing pg_dump/pg_upgrade;
+-- this one intentionally has an OID in the system range
+SELECT lo_create(3001);
+
+COMMENT ON LARGE OBJECT 3001 IS 'testing comments';
+
+-- Clean up
+DROP TABLE lotest_stash_values;
index 3489a9b5780cce975a40ef4164cfcc8ed0d5aafc..c8aab777e7e708cfa888f61184d9b1aaf3d7e47a 100644 (file)
@@ -291,4 +291,14 @@ SELECT lo_unlink(loid) FROM lotest_stash_values;
 (1 row)
 
 \lo_unlink :newloid
-TRUNCATE lotest_stash_values;
+-- Create one more object that we leave behind for testing pg_dump/pg_upgrade;
+-- this one intentionally has an OID in the system range
+SELECT lo_create(3001);
+ lo_create 
+-----------
+      3001
+(1 row)
+
+COMMENT ON LARGE OBJECT 3001 IS 'testing comments';
+-- Clean up
+DROP TABLE lotest_stash_values;
index d5a6d0b3868b855d6541411cc0f2d4e4311e6654..e1893dd10bee43077e67e7ea0f4b467d402d411f 100644 (file)
@@ -291,4 +291,14 @@ SELECT lo_unlink(loid) FROM lotest_stash_values;
 (1 row)
 
 \lo_unlink :newloid
-TRUNCATE lotest_stash_values;
+-- Create one more object that we leave behind for testing pg_dump/pg_upgrade;
+-- this one intentionally has an OID in the system range
+SELECT lo_create(3001);
+ lo_create 
+-----------
+      3001
+(1 row)
+
+COMMENT ON LARGE OBJECT 3001 IS 'testing comments';
+-- Clean up
+DROP TABLE lotest_stash_values;
index 2292fd353386cbc6115ce6ea4fbb45800f8c580f..1b5560f9704327eb4119484287e7c0cc1e1acfce 100644 (file)
@@ -83,7 +83,7 @@ test: select_into select_distinct select_distinct_on select_implicit select_havi
 # ----------
 # Another group of parallel tests
 # ----------
-test: privileges security_label collate large_object
+test: privileges security_label collate
 
 test: misc
 # rules cannot run concurrently with any test that creates a view
index da3b46b8f8604b01962a62c4269be1ef3b2b9833..355fe74a0bc00a705ead9ac81e7263e48c7e3eb8 100644 (file)
@@ -94,7 +94,6 @@ test: prepared_xacts
 test: privileges
 test: security_label
 test: collate
-test: large_object
 test: misc
 test: rules
 test: select_views
diff --git a/src/test/regress/sql/large_object.sql b/src/test/regress/sql/large_object.sql
deleted file mode 100644 (file)
index c06b393..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
--- This is more-or-less DROP IF EXISTS LARGE OBJECT 3001;
-WITH unlink AS (SELECT lo_unlink(loid) FROM pg_largeobject WHERE loid = 3001) SELECT 1;
-
--- Test creation of a large object and leave it for testing pg_upgrade
-SELECT lo_create(3001);
-
-COMMENT ON LARGE OBJECT 3001 IS 'testing comments';