Skip to content

Commit d2783be

Browse files
committed
Remove inadvertent copyright violation in largeobject regression test.
Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead.
1 parent 2dd352d commit d2783be

File tree

3 files changed

+130
-106
lines changed

3 files changed

+130
-106
lines changed

src/test/regress/input/largeobject.source

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,35 @@ UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS in
4242
-- lowrite(fd integer, data bytea) returns integer
4343
-- the integer is the number of bytes written
4444
SELECT lowrite(fd, '
45-
Whose woods these are I think I know,
46-
His house is in the village though.
47-
He will not see me stopping here,
48-
To watch his woods fill up with snow.
49-
50-
My little horse must think it queer,
51-
To stop without a farmhouse near,
52-
Between the woods and frozen lake,
53-
The darkest evening of the year.
54-
55-
He gives his harness bells a shake,
56-
To ask if there is some mistake.
57-
The only other sound''s the sweep,
58-
Of easy wind and downy flake.
59-
60-
The woods are lovely, dark and deep,
61-
But I have promises to keep,
62-
And miles to go before I sleep,
63-
And miles to go before I sleep.
64-
65-
-- Robert Frost
45+
I wandered lonely as a cloud
46+
That floats on high o''er vales and hills,
47+
When all at once I saw a crowd,
48+
A host, of golden daffodils;
49+
Beside the lake, beneath the trees,
50+
Fluttering and dancing in the breeze.
51+
52+
Continuous as the stars that shine
53+
And twinkle on the milky way,
54+
They stretched in never-ending line
55+
Along the margin of a bay:
56+
Ten thousand saw I at a glance,
57+
Tossing their heads in sprightly dance.
58+
59+
The waves beside them danced; but they
60+
Out-did the sparkling waves in glee:
61+
A poet could not but be gay,
62+
In such a jocund company:
63+
I gazed--and gazed--but little thought
64+
What wealth the show to me had brought:
65+
66+
For oft, when on my couch I lie
67+
In vacant or in pensive mood,
68+
They flash upon that inward eye
69+
Which is the bliss of solitude;
70+
And then my heart with pleasure fills,
71+
And dances with the daffodils.
72+
73+
-- William Wordsworth
6674
') FROM lotest_stash_values;
6775

6876
-- lo_close(fd integer) returns integer
@@ -81,21 +89,21 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
8189
-- SEEK_CUR (= 1) meaning relative to current position
8290
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
8391
-- returns current position in file
84-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
92+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
8593

8694
-- loread/lowrite names are wonky, different from other functions which are lo_*
8795
-- loread(fd integer, len integer) returns bytea
88-
SELECT loread(fd, 35) FROM lotest_stash_values;
96+
SELECT loread(fd, 28) FROM lotest_stash_values;
8997

9098
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
9199

92100
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
93101

94102
SELECT lo_tell(fd) FROM lotest_stash_values;
95103

96-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
104+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
97105

98-
SELECT loread(fd, 35) FROM lotest_stash_values;
106+
SELECT loread(fd, 28) FROM lotest_stash_values;
99107

100108
SELECT lo_close(fd) FROM lotest_stash_values;
101109

@@ -110,7 +118,7 @@ ABORT;
110118
BEGIN;
111119
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
112120

113-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
121+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
114122
SELECT loread(fd, 15) FROM lotest_stash_values;
115123

116124
SELECT lo_truncate(fd, 10000) FROM lotest_stash_values;

src/test/regress/output/largeobject.source

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,39 @@ UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS in
4141
-- lowrite(fd integer, data bytea) returns integer
4242
-- the integer is the number of bytes written
4343
SELECT lowrite(fd, '
44-
Whose woods these are I think I know,
45-
His house is in the village though.
46-
He will not see me stopping here,
47-
To watch his woods fill up with snow.
48-
49-
My little horse must think it queer,
50-
To stop without a farmhouse near,
51-
Between the woods and frozen lake,
52-
The darkest evening of the year.
53-
54-
He gives his harness bells a shake,
55-
To ask if there is some mistake.
56-
The only other sound''s the sweep,
57-
Of easy wind and downy flake.
58-
59-
The woods are lovely, dark and deep,
60-
But I have promises to keep,
61-
And miles to go before I sleep,
62-
And miles to go before I sleep.
63-
64-
-- Robert Frost
44+
I wandered lonely as a cloud
45+
That floats on high o''er vales and hills,
46+
When all at once I saw a crowd,
47+
A host, of golden daffodils;
48+
Beside the lake, beneath the trees,
49+
Fluttering and dancing in the breeze.
50+
51+
Continuous as the stars that shine
52+
And twinkle on the milky way,
53+
They stretched in never-ending line
54+
Along the margin of a bay:
55+
Ten thousand saw I at a glance,
56+
Tossing their heads in sprightly dance.
57+
58+
The waves beside them danced; but they
59+
Out-did the sparkling waves in glee:
60+
A poet could not but be gay,
61+
In such a jocund company:
62+
I gazed--and gazed--but little thought
63+
What wealth the show to me had brought:
64+
65+
For oft, when on my couch I lie
66+
In vacant or in pensive mood,
67+
They flash upon that inward eye
68+
Which is the bliss of solitude;
69+
And then my heart with pleasure fills,
70+
And dances with the daffodils.
71+
72+
-- William Wordsworth
6573
') FROM lotest_stash_values;
6674
lowrite
6775
---------
68-
578
76+
848
6977
(1 row)
7078

7179
-- lo_close(fd integer) returns integer
@@ -86,24 +94,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
8694
-- SEEK_CUR (= 1) meaning relative to current position
8795
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
8896
-- returns current position in file
89-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
97+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
9098
lo_lseek
9199
----------
92-
422
100+
104
93101
(1 row)
94102

95103
-- loread/lowrite names are wonky, different from other functions which are lo_*
96104
-- loread(fd integer, len integer) returns bytea
97-
SELECT loread(fd, 35) FROM lotest_stash_values;
98-
loread
99-
-------------------------------------
100-
The woods are lovely, dark and deep
105+
SELECT loread(fd, 28) FROM lotest_stash_values;
106+
loread
107+
------------------------------
108+
A host, of golden daffodils;
101109
(1 row)
102110

103111
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
104112
lo_lseek
105113
----------
106-
438
114+
113
107115
(1 row)
108116

109117
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -115,19 +123,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
115123
SELECT lo_tell(fd) FROM lotest_stash_values;
116124
lo_tell
117125
---------
118-
439
126+
114
119127
(1 row)
120128

121-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
129+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
122130
lo_lseek
123131
----------
124-
422
132+
104
125133
(1 row)
126134

127-
SELECT loread(fd, 35) FROM lotest_stash_values;
128-
loread
129-
-------------------------------------
130-
The woods are lonely, dark and deep
135+
SELECT loread(fd, 28) FROM lotest_stash_values;
136+
loread
137+
------------------------------
138+
A host, on golden daffodils;
131139
(1 row)
132140

133141
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -149,16 +157,16 @@ ABORT;
149157
-- Test truncation.
150158
BEGIN;
151159
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
152-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
160+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
153161
lo_truncate
154162
-------------
155163
0
156164
(1 row)
157165

158166
SELECT loread(fd, 15) FROM lotest_stash_values;
159-
loread
160-
---------------
161-
\012Whose woo
167+
loread
168+
----------------
169+
\012I wandered
162170
(1 row)
163171

164172
SELECT lo_truncate(fd, 10000) FROM lotest_stash_values;

src/test/regress/output/largeobject_1.source

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,39 @@ UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS in
4141
-- lowrite(fd integer, data bytea) returns integer
4242
-- the integer is the number of bytes written
4343
SELECT lowrite(fd, '
44-
Whose woods these are I think I know,
45-
His house is in the village though.
46-
He will not see me stopping here,
47-
To watch his woods fill up with snow.
48-
49-
My little horse must think it queer,
50-
To stop without a farmhouse near,
51-
Between the woods and frozen lake,
52-
The darkest evening of the year.
53-
54-
He gives his harness bells a shake,
55-
To ask if there is some mistake.
56-
The only other sound''s the sweep,
57-
Of easy wind and downy flake.
58-
59-
The woods are lovely, dark and deep,
60-
But I have promises to keep,
61-
And miles to go before I sleep,
62-
And miles to go before I sleep.
63-
64-
-- Robert Frost
44+
I wandered lonely as a cloud
45+
That floats on high o''er vales and hills,
46+
When all at once I saw a crowd,
47+
A host, of golden daffodils;
48+
Beside the lake, beneath the trees,
49+
Fluttering and dancing in the breeze.
50+
51+
Continuous as the stars that shine
52+
And twinkle on the milky way,
53+
They stretched in never-ending line
54+
Along the margin of a bay:
55+
Ten thousand saw I at a glance,
56+
Tossing their heads in sprightly dance.
57+
58+
The waves beside them danced; but they
59+
Out-did the sparkling waves in glee:
60+
A poet could not but be gay,
61+
In such a jocund company:
62+
I gazed--and gazed--but little thought
63+
What wealth the show to me had brought:
64+
65+
For oft, when on my couch I lie
66+
In vacant or in pensive mood,
67+
They flash upon that inward eye
68+
Which is the bliss of solitude;
69+
And then my heart with pleasure fills,
70+
And dances with the daffodils.
71+
72+
-- William Wordsworth
6573
') FROM lotest_stash_values;
6674
lowrite
6775
---------
68-
578
76+
848
6977
(1 row)
7078

7179
-- lo_close(fd integer) returns integer
@@ -86,24 +94,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
8694
-- SEEK_CUR (= 1) meaning relative to current position
8795
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
8896
-- returns current position in file
89-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
97+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
9098
lo_lseek
9199
----------
92-
422
100+
104
93101
(1 row)
94102

95103
-- loread/lowrite names are wonky, different from other functions which are lo_*
96104
-- loread(fd integer, len integer) returns bytea
97-
SELECT loread(fd, 35) FROM lotest_stash_values;
98-
loread
99-
-------------------------------------
100-
The woods are lovely, dark and deep
105+
SELECT loread(fd, 28) FROM lotest_stash_values;
106+
loread
107+
------------------------------
108+
A host, of golden daffodils;
101109
(1 row)
102110

103111
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
104112
lo_lseek
105113
----------
106-
438
114+
113
107115
(1 row)
108116

109117
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -115,19 +123,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
115123
SELECT lo_tell(fd) FROM lotest_stash_values;
116124
lo_tell
117125
---------
118-
439
126+
114
119127
(1 row)
120128

121-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
129+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
122130
lo_lseek
123131
----------
124-
422
132+
104
125133
(1 row)
126134

127-
SELECT loread(fd, 35) FROM lotest_stash_values;
128-
loread
129-
-------------------------------------
130-
The woods are lonely, dark and deep
135+
SELECT loread(fd, 28) FROM lotest_stash_values;
136+
loread
137+
------------------------------
138+
A host, on golden daffodils;
131139
(1 row)
132140

133141
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -149,16 +157,16 @@ ABORT;
149157
-- Test truncation.
150158
BEGIN;
151159
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
152-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
160+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
153161
lo_truncate
154162
-------------
155163
0
156164
(1 row)
157165

158166
SELECT loread(fd, 15) FROM lotest_stash_values;
159-
loread
160-
---------------
161-
\012Whose woo
167+
loread
168+
----------------
169+
\012I wandered
162170
(1 row)
163171

164172
SELECT lo_truncate(fd, 10000) FROM lotest_stash_values;

0 commit comments

Comments
 (0)