Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c1b298

Browse files
author
Thomas G. Lockhart
committed
Update output to new psql conventions.
1 parent6033cfd commit9c1b298

File tree

10 files changed

+747
-453
lines changed

10 files changed

+747
-453
lines changed
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
QUERY: CREATE AGGREGATE newavg (
2-
sfunc1 = int4pl, basetype = int4, stype1 = int4,
1+
--
2+
-- CREATE_AGGREGATE
3+
--
4+
-- all functions CREATEd
5+
CREATE AGGREGATE newavg (
6+
sfunc1 = int4pl, basetype = int4, stype1 = int4,
37
sfunc2 = int4inc, stype2 = int4,
48
finalfunc = int4div,
59
initcond1 = '0', initcond2 = '0'
610
);
7-
QUERY: CREATE AGGREGATE newsum (
8-
sfunc1 = int4pl, basetype = int4, stype1 = int4,
11+
-- sfunc1 (value-dependent) only
12+
CREATE AGGREGATE newsum (
13+
sfunc1 = int4pl, basetype = int4, stype1 = int4,
914
initcond1 = '0'
1015
);
11-
QUERY: CREATE AGGREGATE newcnt (
12-
sfunc2 = int4inc, basetype = int4, stype2 = int4,
16+
-- sfunc2 (value-independent) only
17+
CREATE AGGREGATE newcnt (
18+
sfunc2 = int4inc, basetype = int4, stype2 = int4,
1319
initcond2 = '0'
1420
);
Lines changed: 61 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,61 @@
1-
QUERY: CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
2-
QUERY: CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
3-
QUERY: CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
4-
QUERY: CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops);
5-
QUERY: CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
6-
QUERY: CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
7-
QUERY: CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
8-
QUERY: CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
9-
QUERY: CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
10-
QUERY: CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
11-
QUERY: CREATE INDEX rix ON road USING btree (name text_ops);
12-
QUERY: CREATE INDEX iix ON ihighway USING btree (name text_ops);
13-
QUERY: CREATE INDEX six ON shighway USING btree (name text_ops);
14-
QUERY: CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
15-
QUERY: CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops);
16-
QUERY: CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
17-
QUERY: CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
18-
QUERY: CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops);
19-
QUERY: CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
20-
QUERY: CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops);
21-
QUERY: CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
22-
QUERY: CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
1+
--
2+
-- CREATE_INDEX
3+
-- Create ancillary data structures (i.e. indices)
4+
--
5+
--
6+
-- BTREE
7+
--
8+
CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
9+
CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
10+
CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
11+
CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops);
12+
CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
13+
CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
14+
CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
15+
CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
16+
CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
17+
CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
18+
CREATE INDEX rix ON road USING btree (name text_ops);
19+
CREATE INDEX iix ON ihighway USING btree (name text_ops);
20+
CREATE INDEX six ON shighway USING btree (name text_ops);
21+
--
22+
-- BTREE ascending/descending cases
23+
--
24+
-- we load int4/text from pure descending data (each key is a new
25+
-- low key) and name/f8 from pure ascending data (each key is a new
26+
-- high key). we had a bug where new low keys would sometimes be
27+
-- "lost".
28+
--
29+
CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
30+
CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops);
31+
CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
32+
CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
33+
--
34+
-- BTREE partial indices
35+
-- partial indices are not supported in PostgreSQL
36+
--
37+
--CREATE INDEX onek2_u1_prtl ON onek2 USING btree(unique1 int4_ops)
38+
--where onek2.unique1 < 20 or onek2.unique1 > 980;
39+
--CREATE INDEX onek2_u2_prtl ON onek2 USING btree(unique2 int4_ops)
40+
--where onek2.stringu1 < 'B';
41+
-- EXTEND INDEX onek2_u2_prtl where onek2.stringu1 < 'C';
42+
-- EXTEND INDEX onek2_u2_prtl;
43+
-- CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 name_ops)
44+
--where onek2.stringu1 >= 'J' and onek2.stringu1 < 'K';
45+
--
46+
-- RTREE
47+
--
48+
-- rtrees use a quadratic page-splitting algorithm that takes a
49+
-- really, really long time. we don't test all rtree opclasses
50+
-- in the regression test (we check them USING the sequoia 2000
51+
-- benchmark).
52+
--
53+
CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops);
54+
--
55+
-- HASH
56+
--
57+
CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
58+
CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops);
59+
CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
60+
CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
61+
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
Lines changed: 98 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,151 @@
1-
QUERY: INSERT INTO tenk2 VALUES (tenk1.*);
2-
QUERY: SELECT * INTO TABLE onek2 FROM onek;
3-
QUERY: INSERT INTO fast_emp4000 VALUES (slow_emp4000.*);
4-
QUERY: SELECT *
1+
--
2+
-- CREATE_MISC
3+
--
4+
-- CLASS POPULATION
5+
--(any resemblance to real life is purely coincidental)
6+
--
7+
INSERT INTO tenk2 VALUES (tenk1.*);
8+
SELECT * INTO TABLE onek2 FROM onek;
9+
INSERT INTO fast_emp4000 VALUES (slow_emp4000.*);
10+
SELECT *
511
INTO TABLE Bprime
612
FROM tenk1
713
WHERE unique2 < 1000;
8-
QUERY:INSERT INTO hobbies_r (name, person)
14+
INSERT INTO hobbies_r (name, person)
915
SELECT 'posthacking', p.name
1016
FROM person* p
1117
WHERE p.name = 'mike' or p.name = 'jeff';
12-
QUERY:INSERT INTO hobbies_r (name, person)
18+
INSERT INTO hobbies_r (name, person)
1319
SELECT 'basketball', p.name
1420
FROM person p
1521
WHERE p.name = 'joe' or p.name = 'sally';
16-
QUERY:INSERT INTO hobbies_r (name) VALUES ('skywalking');
17-
QUERY:INSERT INTO equipment_r (name, hobby) VALUES ('advil', 'posthacking');
18-
QUERY:INSERT INTO equipment_r (name, hobby) VALUES ('peet''s coffee', 'posthacking');
19-
QUERY:INSERT INTO equipment_r (name, hobby) VALUES ('hightops', 'basketball');
20-
QUERY:INSERT INTO equipment_r (name, hobby) VALUES ('guts', 'skywalking');
21-
QUERY:SELECT *
22+
INSERT INTO hobbies_r (name) VALUES ('skywalking');
23+
INSERT INTO equipment_r (name, hobby) VALUES ('advil', 'posthacking');
24+
INSERT INTO equipment_r (name, hobby) VALUES ('peet''s coffee', 'posthacking');
25+
INSERT INTO equipment_r (name, hobby) VALUES ('hightops', 'basketball');
26+
INSERT INTO equipment_r (name, hobby) VALUES ('guts', 'skywalking');
27+
SELECT *
2228
INTO TABLE ramp
2329
FROM road
2430
WHERE name ~ '.*Ramp';
25-
QUERY:INSERT INTO ihighway
26-
SELECT *
27-
FROM road
31+
INSERT INTO ihighway
32+
SELECT *
33+
FROM road
2834
WHERE name ~ 'I- .*';
29-
QUERY:INSERT INTO shighway
30-
SELECT *
31-
FROM road
35+
INSERT INTO shighway
36+
SELECT *
37+
FROM road
3238
WHERE name ~ 'State Hwy.*';
33-
QUERY:UPDATE shighway
39+
UPDATE shighway
3440
SET surface = 'asphalt';
35-
QUERY:INSERT INTO a_star (class, a) VALUES ('a', 1);
36-
QUERY:INSERT INTO a_star (class, a) VALUES ('a', 2);
37-
QUERY:INSERT INTO a_star (class) VALUES ('a');
38-
QUERY:INSERT INTO b_star (class, a, b) VALUES ('b', 3, 'mumble'::text);
39-
QUERY:INSERT INTO b_star (class, a) VALUES ('b', 4);
40-
QUERY:INSERT INTO b_star (class, b) VALUES ('b', 'bumble'::text);
41-
QUERY:INSERT INTO b_star (class) VALUES ('b');
42-
QUERY:INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::name);
43-
QUERY:INSERT INTO c_star (class, a) VALUES ('c', 6);
44-
QUERY:INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::name);
45-
QUERY:INSERT INTO c_star (class) VALUES ('c');
46-
QUERY:INSERT INTO d_star (class, a, b, c, d)
41+
INSERT INTO a_star (class, a) VALUES ('a', 1);
42+
INSERT INTO a_star (class, a) VALUES ('a', 2);
43+
INSERT INTO a_star (class) VALUES ('a');
44+
INSERT INTO b_star (class, a, b) VALUES ('b', 3, 'mumble'::text);
45+
INSERT INTO b_star (class, a) VALUES ('b', 4);
46+
INSERT INTO b_star (class, b) VALUES ('b', 'bumble'::text);
47+
INSERT INTO b_star (class) VALUES ('b');
48+
INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::name);
49+
INSERT INTO c_star (class, a) VALUES ('c', 6);
50+
INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::name);
51+
INSERT INTO c_star (class) VALUES ('c');
52+
INSERT INTO d_star (class, a, b, c, d)
4753
VALUES ('d', 7, 'grumble'::text, 'hi sunita'::name, '0.0'::float8);
48-
QUERY:INSERT INTO d_star (class, a, b, c)
54+
INSERT INTO d_star (class, a, b, c)
4955
VALUES ('d', 8, 'stumble'::text, 'hi koko'::name);
50-
QUERY:INSERT INTO d_star (class, a, b, d)
56+
INSERT INTO d_star (class, a, b, d)
5157
VALUES ('d', 9, 'rumble'::text, '1.1'::float8);
52-
QUERY:INSERT INTO d_star (class, a, c, d)
58+
INSERT INTO d_star (class, a, c, d)
5359
VALUES ('d', 10, 'hi kristin'::name, '10.01'::float8);
54-
QUERY:INSERT INTO d_star (class, b, c, d)
60+
INSERT INTO d_star (class, b, c, d)
5561
VALUES ('d', 'crumble'::text, 'hi boris'::name, '100.001'::float8);
56-
QUERY:INSERT INTO d_star (class, a, b)
62+
INSERT INTO d_star (class, a, b)
5763
VALUES ('d', 11, 'fumble'::text);
58-
QUERY:INSERT INTO d_star (class, a, c)
64+
INSERT INTO d_star (class, a, c)
5965
VALUES ('d', 12, 'hi avi'::name);
60-
QUERY:INSERT INTO d_star (class, a, d)
66+
INSERT INTO d_star (class, a, d)
6167
VALUES ('d', 13, '1000.0001'::float8);
62-
QUERY:INSERT INTO d_star (class, b, c)
68+
INSERT INTO d_star (class, b, c)
6369
VALUES ('d', 'tumble'::text, 'hi andrew'::name);
64-
QUERY:INSERT INTO d_star (class, b, d)
70+
INSERT INTO d_star (class, b, d)
6571
VALUES ('d', 'humble'::text, '10000.00001'::float8);
66-
QUERY:INSERT INTO d_star (class, c, d)
72+
INSERT INTO d_star (class, c, d)
6773
VALUES ('d', 'hi ginger'::name, '100000.000001'::float8);
68-
QUERY:INSERT INTO d_star (class, a) VALUES ('d', 14);
69-
QUERY:INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text);
70-
QUERY:INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name);
71-
QUERY:INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'::float8);
72-
QUERY:INSERT INTO d_star (class) VALUES ('d');
73-
QUERY:INSERT INTO e_star (class, a, c, e)
74+
INSERT INTO d_star (class, a) VALUES ('d', 14);
75+
INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text);
76+
INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name);
77+
INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'::float8);
78+
INSERT INTO d_star (class) VALUES ('d');
79+
INSERT INTO e_star (class, a, c, e)
7480
VALUES ('e', 15, 'hi carol'::name, '-1'::int2);
75-
QUERY:INSERT INTO e_star (class, a, c)
81+
INSERT INTO e_star (class, a, c)
7682
VALUES ('e', 16, 'hi bob'::name);
77-
QUERY:INSERT INTO e_star (class, a, e)
83+
INSERT INTO e_star (class, a, e)
7884
VALUES ('e', 17, '-2'::int2);
79-
QUERY:INSERT INTO e_star (class, c, e)
85+
INSERT INTO e_star (class, c, e)
8086
VALUES ('e', 'hi michelle'::name, '-3'::int2);
81-
QUERY:INSERT INTO e_star (class, a)
87+
INSERT INTO e_star (class, a)
8288
VALUES ('e', 18);
83-
QUERY:INSERT INTO e_star (class, c)
89+
INSERT INTO e_star (class, c)
8490
VALUES ('e', 'hi elisa'::name);
85-
QUERY:INSERT INTO e_star (class, e)
91+
INSERT INTO e_star (class, e)
8692
VALUES ('e', '-4'::int2);
87-
QUERY:INSERT INTO f_star (class, a, c, e, f)
93+
INSERT INTO f_star (class, a, c, e, f)
8894
VALUES ('f', 19, 'hi claire'::name, '-5'::int2, '(1,3),(2,4)'::polygon);
89-
QUERY:INSERT INTO f_star (class, a, c, e)
95+
INSERT INTO f_star (class, a, c, e)
9096
VALUES ('f', 20, 'hi mike'::name, '-6'::int2);
91-
QUERY:INSERT INTO f_star (class, a, c, f)
97+
INSERT INTO f_star (class, a, c, f)
9298
VALUES ('f', 21, 'hi marcel'::name, '(11,44),(22,55),(33,66)'::polygon);
93-
QUERY:INSERT INTO f_star (class, a, e, f)
99+
INSERT INTO f_star (class, a, e, f)
94100
VALUES ('f', 22, '-7'::int2, '(111,555),(222,666),(333,777),(444,888)'::polygon);
95-
QUERY:INSERT INTO f_star (class, c, e, f)
96-
VALUES ('f', 'hi keith'::name, '-8'::int2,
101+
INSERT INTO f_star (class, c, e, f)
102+
VALUES ('f', 'hi keith'::name, '-8'::int2,
97103
'(1111,3333),(2222,4444)'::polygon);
98-
QUERY:INSERT INTO f_star (class, a, c)
104+
INSERT INTO f_star (class, a, c)
99105
VALUES ('f', 24, 'hi marc'::name);
100-
QUERY:INSERT INTO f_star (class, a, e)
106+
INSERT INTO f_star (class, a, e)
101107
VALUES ('f', 25, '-9'::int2);
102-
QUERY:INSERT INTO f_star (class, a, f)
103-
VALUES ('f', 26, '(11111,33333),(22222,44444)'::polygon);
104-
QUERY:INSERT INTO f_star (class, c, e)
108+
INSERT INTO f_star (class, a, f)
109+
VALUES ('f', 26, '(11111,33333),(22222,44444)'::polygon);
110+
INSERT INTO f_star (class, c, e)
105111
VALUES ('f', 'hi allison'::name, '-10'::int2);
106-
QUERY:INSERT INTO f_star (class, c, f)
112+
INSERT INTO f_star (class, c, f)
107113
VALUES ('f', 'hi jeff'::name,
108114
'(111111,333333),(222222,444444)'::polygon);
109-
QUERY:INSERT INTO f_star (class, e, f)
115+
INSERT INTO f_star (class, e, f)
110116
VALUES ('f', '-11'::int2, '(1111111,3333333),(2222222,4444444)'::polygon);
111-
QUERY:INSERT INTO f_star (class, a) VALUES ('f', 27);
112-
QUERY:INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::name);
113-
QUERY:INSERT INTO f_star (class, e) VALUES ('f', '-12'::int2);
114-
QUERY:INSERT INTO f_star (class, f)
117+
INSERT INTO f_star (class, a) VALUES ('f', 27);
118+
INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::name);
119+
INSERT INTO f_star (class, e) VALUES ('f', '-12'::int2);
120+
INSERT INTO f_star (class, f)
115121
VALUES ('f', '(11111111,33333333),(22222222,44444444)'::polygon);
116-
QUERY: INSERT INTO f_star (class) VALUES ('f');
117-
QUERY: INSERT INTO arrtest (a[5], b[2][1][2], c, d, f, g)
122+
INSERT INTO f_star (class) VALUES ('f');
123+
--
124+
-- ARRAYS
125+
--
126+
--
127+
-- only this array as a 0-based 'e', the others are 1-based.
128+
-- 'e' is also a large object.
129+
--
130+
INSERT INTO arrtest (a[5], b[2][1][2], c, d, f, g)
118131
VALUES ('{1,2,3,4,5}', '{{{},{1,2}}}', '{}', '{}', '{}', '{}');
119-
QUERY:UPDATE arrtest SET e[0] = '1.1';
120-
QUERY:UPDATE arrtest SET e[1] = '2.2';
121-
QUERY:INSERT INTO arrtest (a, b[2][2][1], c, d, e, f, g)
122-
VALUES ('{11,12,23}', '{{3,4},{4,5}}', '{"foobar"}',
132+
UPDATE arrtest SET e[0] = '1.1';
133+
UPDATE arrtest SET e[1] = '2.2';
134+
INSERT INTO arrtest (a, b[2][2][1], c, d, e, f, g)
135+
VALUES ('{11,12,23}', '{{3,4},{4,5}}', '{"foobar"}',
123136
'{{"elt1", "elt2"}}', '{"3.4", "6.7"}',
124137
'{"abc","abcdefgh"}', '{"abc","abcdefgh"}');
125-
QUERY:INSERT INTO arrtest (a, b[1][2][2], c, d[2][1])
138+
INSERT INTO arrtest (a, b[1][2][2], c, d[2][1])
126139
VALUES ('{}', '{3,4}', '{foo,bar}', '{bar,foo}');
127-
QUERY: CREATE TABLE iportaltest (
128-
iint4,
129-
dfloat4,
140+
--
141+
-- for internal portal (cursor) tests
142+
--
143+
CREATE TABLE iportaltest (
144+
iint4,
145+
dfloat4,
130146
ppolygon
131147
);
132-
QUERY:INSERT INTO iportaltest (i, d, p)
148+
INSERT INTO iportaltest (i, d, p)
133149
VALUES (1, 3.567, '(3.0,1.0),(4.0,2.0)'::polygon);
134-
QUERY:INSERT INTO iportaltest (i, d, p)
150+
INSERT INTO iportaltest (i, d, p)
135151
VALUES (2, 89.05, '(4.0,2.0),(3.0,1.0)'::polygon);
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
QUERY: CREATE OPERATOR ## (
1+
--
2+
-- CREATE_OPERATOR
3+
--
4+
CREATE OPERATOR ## (
25
leftarg = path,
36
rightarg = path,
47
procedure = path_inter,
5-
commutator = ##
8+
commutator = ##
69
);
7-
QUERY:CREATE OPERATOR <% (
10+
CREATE OPERATOR <% (
811
leftarg = point,
912
rightarg = widget,
1013
procedure = pt_in_widget,
1114
commutator = >% ,
12-
negator = >=%
15+
negator = >=%
1316
);
14-
QUERY:CREATE OPERATOR @#@ (
15-
rightarg = int4,
16-
procedure = int4fac
17+
CREATE OPERATOR @#@ (
18+
rightarg = int4,-- left unary
19+
procedure = int4fac
1720
);
18-
QUERY:CREATE OPERATOR #@# (
19-
leftarg = int4,
20-
procedure = int4fac
21+
CREATE OPERATOR #@# (
22+
leftarg = int4,-- right unary
23+
procedure = int4fac
2124
);
22-
QUERY:CREATE OPERATOR #%# (
23-
leftarg = int4,
24-
procedure = int4fac
25+
CREATE OPERATOR #%# (
26+
leftarg = int4,-- right unary
27+
procedure = int4fac
2528
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp