mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Cosmetic patch to large object regression test.
Jeremy Drake
This commit is contained in:
@@ -14,11 +14,11 @@ BEGIN;
|
||||
|
||||
-- lo_open(lobjId oid, mode integer) returns integer
|
||||
-- The mode parameter to lo_open uses two constants:
|
||||
-- INV_READ = 0x20000 = 2 * 16^4
|
||||
-- INV_WRITE = 0x40000 = 4 * 16^4
|
||||
-- INV_READ = 0x20000
|
||||
-- INV_WRITE = 0x40000
|
||||
-- The return value is a file descriptor-like value which remains valid for the
|
||||
-- transaction.
|
||||
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
|
||||
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS integer));
|
||||
|
||||
-- loread/lowrite names are wonky, different from other functions which are lo_*
|
||||
-- lowrite(fd integer, data bytea) returns integer
|
||||
@@ -55,7 +55,7 @@ END;
|
||||
|
||||
-- Read out a portion
|
||||
BEGIN;
|
||||
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
|
||||
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
|
||||
|
||||
-- lo_lseek(fd integer, offset integer, whence integer) returns integer
|
||||
-- offset is in bytes, whence is one of three values:
|
||||
@@ -111,7 +111,7 @@ TRUNCATE lotest_stash_values;
|
||||
INSERT INTO lotest_stash_values (loid) SELECT lo_import('@abs_srcdir@/data/tenk.data');
|
||||
|
||||
BEGIN;
|
||||
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
|
||||
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
|
||||
|
||||
-- with the default BLKSZ, LOBLKSZ = 2048, so this positions us for a block
|
||||
-- edge case
|
||||
|
Reference in New Issue
Block a user