Accept regression differences in largeobject test case
authorPavan Deolasee <[email protected]>
Tue, 22 Aug 2017 11:24:29 +0000 (16:54 +0530)
committerPavan Deolasee <[email protected]>
Tue, 22 Aug 2017 11:24:29 +0000 (16:54 +0530)
Since large objects are not supported by XL, these were mostly cosmetic
differences without any possible bug.

src/test/regress/input/largeobject.source
src/test/regress/output/largeobject_3.source

index fe7db90efcfbb1c676943c0003b952310d8d7e7e..b405e9bceb2c4d187d8e8547dd156b7cf2bb335d 100644 (file)
@@ -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
index 1cae38f899a9ccd71304e126f11800cf72da0622..abfa16ea90469849f084ee5c9ac7270e5f6ff1fb 100644 (file)
@@ -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;