Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
00a38075
Commit
00a38075
authored
Mar 03, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic patch to large object regression test.
Jeremy Drake
parent
bc292937
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/test/regress/input/largeobject.source
src/test/regress/input/largeobject.source
+5
-5
src/test/regress/output/largeobject.source
src/test/regress/output/largeobject.source
+5
-5
No files found.
src/test/regress/input/largeobject.source
View file @
00a38075
...
...
@@ -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
...
...
src/test/regress/output/largeobject.source
View file @
00a38075
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment