8000 Remove inadvertent copyright violation in largeobject regression test. · larkly/postgres-docker@d5ea7e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit d5ea7e6

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 62f1349 commit d5ea7e6

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

5361
-- lo_close(fd integer) returns integer
@@ -66,21 +74,21 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
6674
-- SEEK_CUR (= 1) meaning relative to current position
6775
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
6876
-- returns current position in file
69-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
77+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
7078

7179
-- loread/lowrite names are wonky, different from other functions which are lo_*
7280
-- loread(fd integer, len integer) returns bytea
73-
SELECT loread(fd, 35) FROM lotest_stash_values;
81+
SELECT loread(fd, 28) FROM lotest_stash_values;
7482

7583
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
7684

7785
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
7886

7987
SELECT lo_tell(fd) FROM lotest_stash_values;
8088

81-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
89+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
8290

83-
SELECT loread(fd, 35) FROM lotest_stash_values;
91+
SELECT loread(fd, 28) FROM lotest_stash_values;
8492

8593
SELECT lo_close(fd) FROM lotest_stash_values;
8694

@@ -95,7 +103,7 @@ ABORT;
95103
BEGIN;
96104
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
97105

98-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
106+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
99107
SELECT loread(fd, 15) FROM lotest_stash_values;
100108

101109
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
@@ -22,31 +22,39 @@ UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS in
2222
-- lowrite(fd integer, data bytea) returns integer
2323
-- the integer is the number of bytes written
2424
SELECT lowrite(fd, '
25-
Whose woods these are I think I know,
26-
His house is in the village though.
27-
He will not see me stopping here,
28-
To watch his woods fill up with snow.
29-
30-
My little horse must think it queer,
31-
To stop without a farmhouse near,
32-
Between the woods and frozen lake,
33-
The darkest evening of the year.
34-
35-
He gives his harness bells a shake,
36-
To ask if there is some mistake.
37-
The only other sound''s the sweep,
38-
Of easy wind and downy flake.
39-
40-
The woods are lovely, dark and deep,
41-
But I have promises to keep,
42-
And miles to go before I sleep,
43-
And miles to go before I sleep.
44-
45-
-- Robert Frost
25+
I wandered lonely as a cloud
26+
That floats on high o''er vales and hills,
27+
When all at once I saw a crowd,
28+
A host, of golden daffodils;
29+
Beside the lake, beneath the trees,
30+
Fluttering and dancing in the breeze.
31+
32+
Continuous as the stars that shine
33+
And twinkle on the milky way,
34+
They stretched in never-ending line
35+
Along the margin of a bay:
36+
Ten thousand saw I at a glance,
37+
Tossing their heads in sprightly dance.
38+
39+
The waves beside them danced; but they
40+
Out-did the sparkling waves in glee:
41+
A poet could not but be gay,
42+
In such a jocund company:
43+
I gazed--and gazed--but little thought
44+
What wealth the show to me had brought:
45+
46+
For oft, when on my couch I lie
47+
In vacant or in pensive mood,
48+
They flash upon that inward eye
49+
Which is the bliss of solitude;
50+
And then my heart with pleasure fills,
51+
And dances with the daffodils.
52+
53+
-- William Wordsworth
4654
') FROM lotest_stash_values;
4755
lowrite
4856
---------
49-
578
57+
848
5058
(1 row)
5159

5260
-- lo_close(fd integer) returns integer
@@ -67,24 +75,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
6775
-- SEEK_CUR (= 1) meaning relative to current position
6876
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
6977
-- returns current position in file
70-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
78+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
7179
lo_lseek
7280
----------
73-
422
81+
104
7482
(1 row)
7583

7684
-- loread/lowrite names are wonky, different from other functions which are lo_*
7785
-- loread(fd integer, len integer) returns bytea
78-
SELECT loread(fd, 35) FROM lotest_stash_values;
79-
loread
80-
-------------------------------------
81-
The woods are lovely, dark and deep
86+
SELECT loread(fd, 28) FROM lotest_stash_values;
87+
loread
88+
------------------------------
89+
A host, of golden daffodils;
8290
(1 row)
8391

8492
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
8593
lo_lseek
8694
----------
87-
438
95+
113
8896
(1 row)
8997

9098
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -96,19 +104,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
96104
SELECT lo_tell(fd) FROM lotest_stash_values;
97105
lo_tell
98106
---------
99-
439
107+
114
100108
(1 row)
101109

102-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
110+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
103111
lo_lseek
104112
----------
105-
422
113+
104
106114
(1 row)
107115

108-
SELECT loread(fd, 35) FROM lotest_stash_values;
109-
loread
110-
-------------------------------------
111-
The woods are lonely, dark and deep
116+
SELECT loread(fd, 28) FROM lotest_stash_values;
117+
loread
118+
------------------------------
119+
A host, on golden daffodils;
112120
(1 row)
113121

114122
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -130,16 +138,16 @@ ABORT;
130138
-- Test truncation.
131139
BEGIN;
132140
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
133-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
141+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
134142
lo_truncate
135143
-------------
136144
0
137145
(1 row)
138146

139147
SELECT loread(fd, 15) FROM lotest_stash_values;
140-
loread
141-
---------------
142-
\012Whose woo
148+
loread
149+
----------------
150+
\012I wandered
143151
(1 row)
144152

145153
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
@@ -22,31 +22,39 @@ UPDATE lotest_stash_values SET fd = lo_open(loid, CAST(x'20000' | x'40000' AS in
2222
-- lowrite(fd integer, data bytea) returns integer
2323
-- the integer is the number of bytes written
2424
SELECT lowrite(fd, '
25-
Whose woods these are I think I know,
26-
His house is in the village though.
27-
He will not see me stopping here,
28-
To watch his woods fill up with snow.
29-
30-
My little horse must think it queer,
31-
To stop without a farmhouse near,
32-
Between the woods and frozen lake,
33-
The darkest evening of the year.
34-
35-
He gives his harness bells a shake,
36-
To ask if there is some mistake.
37-
The only other sound''s the sweep,
38-
Of easy wind and downy flake.
39-
40-
The woods are lovely, dark and deep,
41-
But I have promises to keep,
42-
And miles to go before I sleep,
43-
And miles to go before I sleep.
44-
45-
-- Robert Frost
25+
I wandered lonely as a cloud
26+
That floats on high o''er vales and hills,
27+
When all at once I saw a crowd,
28+
A host, of golden daffodils;
29+
Beside the lake, beneath the trees,
30+
Fluttering and dancing in the breeze.
31+
32+
Continuous as the stars that shine
33+
And twinkle on the milky way,
34+
They stretched in never-ending line
35+
Along the margin of a bay:
36+
Ten thousand saw I at a glance,
37+
Tossing their heads in sprightly dance.
38+
39+
The waves beside them danced; but they
40+
Out-did the sparkling waves in glee:
41+
A poet could not but be gay,
42+
In such a jocund company:
43+
I gazed--and gazed--but little thought
44+
What wealth the show to me had brought:
45+
46+
For oft, when on my couch I lie
47+
In vacant or in pensive mood,
48+
They flash upon that inward eye
49+
Which is the bliss of solitude;
50+
And then my heart with pleasure fills,
51+
And dances with the daffodils.
52+
53+
-- William Wordsworth
4654
') FROM lotest_stash_values;
4755
lowrite
4856
---------
49-
578
57+
848
5058
(1 row)
5159

5260
-- lo_close(fd integer) returns integer
@@ -67,24 +75,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
6775
-- SEEK_CUR (= 1) meaning relative to current position
6876
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
6977
-- returns current position in file
70-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
78+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
7179
lo_lseek
7280
----------
73-
422
81+
104
7482
(1 row)
7583

7684
-- loread/lowrite names are wonky, different from other functions which are lo_*
7785
-- loread(fd integer, len integer) returns bytea
78-
SELECT loread(fd, 35) FROM lotest_stash_values;
79-
loread
80-
-------------------------------------
81-
The woods are lovely, dark and deep
86+
SELECT loread(fd, 28) FROM lotest_stash_values;
87+
loread
88+
------------------------------
89+
A host, of golden daffodils;
8290
(1 row)
8391

8492
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
8593
lo_lseek
8694
----------
87-
438
95+
113
8896
(1 row)
8997

9098
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -96,19 +104,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
96104
SELECT lo_tell(fd) FROM lotest_stash_values;
97105
lo_tell
98106
---------
99-
439
107+
114
100108
(1 row)
101109

102-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
110+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
103111
lo_lseek
104112
----------
105-
422
113+
104
106114
(1 row)
107115

108-
SELECT loread(fd, 35) FROM lotest_stash_values;
109-
loread
110-
-------------------------------------
111-
The woods are lonely, dark and deep
116+
SELECT loread(fd, 28) FROM lotest_stash_values;
117+
loread
118+
------------------------------
119+
A host, on golden daffodils;
112120
(1 row)
113121

114122
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -130,16 +138,16 @@ ABORT;
130138
-- Test truncation.
131139
BEGIN;
132140
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
133-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
141+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
134142
lo_truncate
135143
-------------
136144
0
137145
(1 row)
138146

139147
SELECT loread(fd, 15) FROM lotest_stash_values;
140-
loread
141-
---------------
142-
\012Whose woo
148+
loread
149+
----------------
150+
\012I wandered
143151
(1 row)
144152

145153
SELECT lo_truncate(fd, 10000) FROM lotest_stash_values;

0 commit comments

Comments
 (0)
0