mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Merge large_object.sql test into largeobject.source.
It seems pretty confusing to have tests named both largeobject and large_object. The latter is of very recent vintage (commitff992c074
), so get rid of it in favor of merging into the former. Also, enable the LO comment test that was added by commit70ad7ed4e
, 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
This commit is contained in:
@@ -86,10 +86,8 @@ END;
|
||||
SELECT lo_from_bytea(0, lo_get(loid)) AS newloid FROM lotest_stash_values
|
||||
\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.
|
||||
COMMENT ON LARGE OBJECT :newloid IS 'I Wandered Lonely as a Cloud';
|
||||
|
||||
-- Read out a portion
|
||||
BEGIN;
|
||||
@@ -253,6 +251,13 @@ SELECT lo_from_bytea(0, E'\\xdeadbeef') AS newloid
|
||||
SET bytea_output TO hex;
|
||||
SELECT lo_get(:newloid);
|
||||
|
||||
-- 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;
|
||||
|
||||
DROP ROLE regresslo;
|
||||
|
Reference in New Issue
Block a user