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));
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;