summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPavan Deolasee2017-08-22 11:24:29 +0000
committerPavan Deolasee2017-08-22 11:24:29 +0000
commit53b8595e125c120757ec5ec2431418916839d13c (patch)
treecff3dbe3a569efa9c99e5df8eb83a66f6ce165b6 /src/test
parentd9f369f1af165fb6736899b021b55e152a03aff2 (diff)
Accept regression differences in largeobject test case
Since large objects are not supported by XL, these were mostly cosmetic differences without any possible bug.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/input/largeobject.source1
-rw-r--r--src/test/regress/output/largeobject_3.source18
2 files changed, 15 insertions, 4 deletions
diff --git a/src/test/regress/input/largeobject.source b/src/test/regress/input/largeobject.source
index fe7db90efc..b405e9bceb 100644
--- a/src/test/regress/input/largeobject.source
+++ b/src/test/regress/input/largeobject.source
@@ -87,6 +87,7 @@ SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values
\gset
-- Add a comment to it, as well, for pg_dump/pg_upgrade testing.
+-- this fails in XL because the previous queriy does not return anything
COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud';
-- Read out a portion
diff --git a/src/test/regress/output/largeobject_3.source b/src/test/regress/output/largeobject_3.source
index 1cae38f899..abfa16ea90 100644
--- a/src/test/regress/output/largeobject_3.source
+++ b/src/test/regress/output/largeobject_3.source
@@ -92,10 +92,12 @@ END;
SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values
\gset
no rows returned for \gset
--- Ideally we'd put a comment on this object for pg_dump testing purposes.
--- But since pg_upgrade fails to preserve large object comments, doing so
--- would break pg_upgrade's regression test.
--- COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud';
+-- Add a comment to it, as well, for pg_dump/pg_upgrade testing.
+-- this fails in XL because the previous queriy does not return anything
+COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud';
+ERROR: syntax error at or near ":"
+LINE 1: COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a ...
+ ^
-- Read out a portion
BEGIN;
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
@@ -424,5 +426,13 @@ SET bytea_output TO hex;
SELECT lo_get(:newloid);
ERROR: Postgres-XL does not yet support large objects
DETAIL: The feature is not currently supported
+-- 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);
+ERROR: Postgres-XL does not yet support large objects
+DETAIL: The feature is not currently supported
+COMMENT ON LARGE OBJECT 3001 IS 'testing comments';
+ERROR: large object 3001 does not exist
+-- Clean up
DROP TABLE lotest_stash_values;
DROP ROLE regress_lo_user;