aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-03-03 20:17:25 +0000
committerBruce Momjian <bruce@momjian.us>2007-03-03 20:17:25 +0000
commit00a38075682a1ce5c52d7efc38b80ae1ec736348 (patch)
tree3afde5b3499dca839ef12f2a53647024f3eb1126 /src
parentbc292937ae6ae2a3e2e3b6c9985d07300a3296cd (diff)
downloadpostgresql-00a38075682a1ce5c52d7efc38b80ae1ec736348.tar.gz
postgresql-00a38075682a1ce5c52d7efc38b80ae1ec736348.zip
Cosmetic patch to large object regression test.
Jeremy Drake
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/input/largeobject.source10
-rw-r--r--src/test/regress/output/largeobject.source10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/regress/input/largeobject.source b/src/test/regress/input/largeobject.source
index 8386922133c..c47cee3a611 100644
--- a/src/test/regress/input/largeobject.source
+++ b/src/test/regress/input/largeobject.source
@@ -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
diff --git a/src/test/regress/output/largeobject.source b/src/test/regress/output/largeobject.source
index f4addeaab5b..4fd3bc156d1 100644
--- a/src/test/regress/output/largeobject.source
+++ b/src/test/regress/output/largeobject.source
@@ -11,11 +11,11 @@ INSERT INTO lotest_stash_values (loid) SELECT lo_creat(42);
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
-- the integer is the number of bytes written
@@ -58,7 +58,7 @@ SELECT lo_close(fd) FROM lotest_stash_values;
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:
-- SEEK_SET (= 0) meaning relative to beginning
@@ -191,7 +191,7 @@ SELECT lo_unlink(loid) from lotest_stash_values;
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
SELECT lo_lseek(fd, 2030, 0) FROM lotest_stash_values;