8000 Remove inadvertent copyright violation in largeobject regression test. · dirbacke/postgres@4671c30 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4671c30

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 f3f4043 commit 4671c30

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

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

6876
-- loread/lowrite names are wonky, different from other functions which are lo_*
6977
-- loread(fd integer, len integer) returns bytea
70-
SELECT loread(fd, 35) FROM lotest_stash_values;
78+
SELECT loread(fd, 28) FROM lotest_stash_values;
7179

7280
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
7381

7482
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
7583

7684
SELECT lo_tell(fd) FROM lotest_stash_values;
7785

78-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
86+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
7987

80-
SELECT loread(fd, 35) FROM lotest_stash_values;
88+
SELECT loread(fd, 28) FROM lotest_stash_values;
8189

8290
SELECT lo_close(fd) FROM lotest_stash_values;
8391

@@ -92,7 +100,7 @@ ABORT;
92100
BEGIN;
93101
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
94102

95-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
103+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
96104
SELECT loread(fd, 15) FROM lotest_stash_values;
97105

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

5058
-- lo_close(fd integer) returns integer
@@ -65,24 +73,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
6573
-- SEEK_CUR (= 1) meaning relative to current position
6674
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
6775
-- returns current position in file
68-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
76+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
6977
lo_lseek
7078
----------
71-
422
79+
104
7280
(1 row)
7381

7482
-- loread/lowrite names are wonky, different from other functions which are lo_*
7583
-- loread(fd integer, len integer) returns bytea
76-
SELECT loread(fd, 35) FROM lotest_stash_values;
77-
loread
78-
-------------------------------------
79-
The woods are lovely, dark and deep
84+
SELECT loread(fd, 28) FROM lotest_stash_values;
85+
loread
86+
------------------------------
87+
A host, of golden daffodils;
8088
(1 row)
8189

8290
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
8391
lo_lseek
8492
----------
85-
438
93+
113
8694
(1 row)
8795

8896
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -94,19 +102,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
94102
SELECT lo_tell(fd) FROM lotest_stash_values;
95103
lo_tell
96104
---------
97-
439
105+
114
98106
(1 row)
99107

100-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
108+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
101109
lo_lseek
102110
----------
103-
422
111+
104
104112
(1 row)
105113

106-
SELECT loread(fd, 35) FROM lotest_stash_values;
107-
loread
108-
-------------------------------------
109-
The woods are lonely, dark and deep
114+
SELECT loread(fd, 28) FROM lotest_stash_values;
115+
loread
116+
------------------------------
117+
A host, on golden daffodils;
110118
(1 row)
111119

112120
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -128,16 +136,16 @@ ABORT;
128136
-- Test truncation.
129137
BEGIN;
130138
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
131-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
139+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
132140
lo_truncate
133141
-------------
134142
0
135143
(1 row)
136144

137145
SELECT loread(fd, 15) FROM lotest_stash_values;
138-
loread
139-
---------------
140-
\012Whose woo
146+
loread
147+
----------------
148+
\012I wandered
141149
(1 row)
142150

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

5058
-- lo_close(fd integer) returns integer
@@ -65,24 +73,24 @@ UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS inte
6573
-- SEEK_CUR (= 1) meaning relative to current position
6674
-- SEEK_END (= 2) meaning relative to end (offset better be negative)
6775
-- returns current position in file
68-
SELECT lo_lseek(fd, 422, 0) FROM lotest_stash_values;
76+
SELECT lo_lseek(fd, 104, 0) FROM lotest_stash_values;
6977
lo_lseek
7078
----------
71-
422
79+
104
7280
(1 row)
7381

7482
-- loread/lowrite names are wonky, different from other functions which are lo_*
7583
-- loread(fd integer, len integer) returns bytea
76-
SELECT loread(fd, 35) FROM lotest_stash_values;
77-
loread
78-
-------------------------------------
79-
The woods are lovely, dark and deep
84+
SELECT loread(fd, 28) FROM lotest_stash_values;
85+
loread
86+
------------------------------
87+
A host, of golden daffodils;
8088
(1 row)
8189

8290
SELECT lo_lseek(fd, -19, 1) FROM lotest_stash_values;
8391
lo_lseek
8492
----------
85-
438
93+
113
8694
(1 row)
8795

8896
SELECT lowrite(fd, 'n') FROM lotest_stash_values;
@@ -94,19 +102,19 @@ SELECT lowrite(fd, 'n') FROM lotest_stash_values;
94102
SELECT lo_tell(fd) FROM lotest_stash_values;
95103
lo_tell
96104
---------
97-
439
105+
114
98106
(1 row)
99107

100-
SELECT lo_lseek(fd, -156, 2) FROM lotest_stash_values;
108+
SELECT lo_lseek(fd, -744, 2) FROM lotest_stash_values;
101109
lo_lseek
102110
----------
103-
422
111+
104
104112
(1 row)
105113

106-
SELECT loread(fd, 35) FROM lotest_stash_values;
107-
loread
108-
-------------------------------------
109-
The woods are lonely, dark and deep
114+
SELECT loread(fd, 28) FROM lotest_stash_values;
115+
loread
116+
------------------------------
117+
A host, on golden daffodils;
110118
(1 row)
111119

112120
SELECT lo_close(fd) FROM lotest_stash_values;
@@ -128,16 +136,16 @@ ABORT;
128136
-- Test truncation.
129137
BEGIN;
130138
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
131-
SELECT lo_truncate(fd, 10) FROM lotest_stash_values;
139+
SELECT lo_truncate(fd, 11) FROM lotest_stash_values;
132140
lo_truncate
133141
-------------
134142
0
135143
(1 row)
136144

137145
SELECT loread(fd, 15) FROM lotest_stash_values;
138-
loread
139-
---------------
140-
\012Whose woo
146+
loread
147+
----------------
148+
\012I wandered
141149
(1 row)
142150

143151
SELECT lo_truncate(fd, 10000) FROM lotest_stash_values;

0 commit comments

Comments
 (0)
0