Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 00a3807

Browse files
committed
Cosmetic patch to large object regression test.
Jeremy Drake
1 parent bc29293 commit 00a3807

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/regress/input/largeobject.source

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ BEGIN;
1414

1515
-- lo_open(lobjId oid, mode integer) returns integer
1616
-- The mode parameter to lo_open uses two constants:
17-
-- INV_READ = 0x20000 = 2 * 16^4
18-
-- INV_WRITE = 0x40000 = 4 * 16^4
17+
-- INV_READ = 0x20000
18+
-- INV_WRITE = 0x40000
1919
-- The return value is a file descriptor-like value which remains valid for the
2020
-- transaction.
21-
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
21+
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS integer));
2222

2323
-- loread/lowrite names are wonky, different from other functions which are lo_*
2424
-- lowrite(fd integer, data bytea) returns integer
@@ -55,7 +55,7 @@ END;
5555

5656
-- Read out a portion
5757
BEGIN;
58-
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
58+
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
5959

6060
-- lo_lseek(fd integer, offset integer, whence integer) returns integer
6161
-- offset is in bytes, whence is one of three values:
@@ -111,7 +111,7 @@ TRUNCATE lotest_stash_values;
111111
INSERT INTO lotest_stash_values (loid) SELECT lo_import('@abs_srcdir@/data/tenk.data');
112112

113113
BEGIN;
114-
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
114+
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
115115

116116
-- with the default BLKSZ, LOBLKSZ = 2048, so this positions us for a block
117117
-- edge case

src/test/regress/output/largeobject.source

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ INSERT INTO lotest_stash_values (loid) SELECT lo_creat(42);
1111
BEGIN;
1212
-- lo_open(lobjId oid, mode integer) returns integer
1313
-- The mode parameter to lo_open uses two constants:
14-
-- INV_READ = 0x20000 = 2 * 16^4
15-
-- INV_WRITE = 0x40000 = 4 * 16^4
14+
-- INV_READ = 0x20000
15+
-- INV_WRITE = 0x40000
1616
-- The return value is a file descriptor-like value which remains valid for the
1717
-- transaction.
18-
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
18+
UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS integer));
1919
-- loread/lowrite names are wonky, different from other functions which are lo_*
2020
-- lowrite(fd integer, data bytea) returns integer
2121
-- the integer is the number of bytes written
@@ -58,7 +58,7 @@ SELECT lo_close(fd) FROM lotest_stash_values;
5858
END;
5959
-- Read out a portion
6060
BEGIN;
61-
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
61+
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
6262
-- lo_lseek(fd integer, offset integer, whence integer) returns integer
6363
-- offset is in bytes, whence is one of three values:
6464
-- SEEK_SET (= 0) meaning relative to beginning
@@ -191,7 +191,7 @@ SELECT lo_unlink(loid) from lotest_stash_values;
191191
TRUNCATE lotest_stash_values;
192192
INSERT INTO lotest_stash_values (loid) SELECT lo_import('@abs_srcdir@/data/tenk.data');
193193
BEGIN;
194-
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST((2 | 4) * 16^4 AS integer));
194+
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
195195
-- with the default BLKSZ, LOBLKSZ = 2048, so this positions us for a block
196196
-- edge case
197197
SELECT lo_lseek(fd, 2030, 0) FROM lotest_stash_values;

0 commit comments

Comments
 (0)