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
588ae64c
Commit
588ae64c
authored
Apr 06, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More splits and cleanups...
parent
063190a5
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
4175 additions
and
4173 deletions
+4175
-4173
src/test/regress/expected/create_aggregate.out
src/test/regress/expected/create_aggregate.out
+14
-0
src/test/regress/expected/create_index.out
src/test/regress/expected/create_index.out
+22
-0
src/test/regress/expected/create_operator.out
src/test/regress/expected/create_operator.out
+24
-0
src/test/regress/expected/create_view.out
src/test/regress/expected/create_view.out
+12
-0
src/test/regress/expected/misc.out
src/test/regress/expected/misc.out
+3892
-0
src/test/regress/expected/sanity_check.out
src/test/regress/expected/sanity_check.out
+28
-0
src/test/regress/input/create_misc.source
src/test/regress/input/create_misc.source
+0
-181
src/test/regress/output/create_misc.source
src/test/regress/output/create_misc.source
+0
-3992
src/test/regress/sql/create_aggregate.sql
src/test/regress/sql/create_aggregate.sql
+26
-0
src/test/regress/sql/create_index.sql
src/test/regress/sql/create_index.sql
+90
-0
src/test/regress/sql/create_operator.sql
src/test/regress/sql/create_operator.sql
+32
-0
src/test/regress/sql/create_view.sql
src/test/regress/sql/create_view.sql
+20
-0
src/test/regress/sql/sanity_check.sql
src/test/regress/sql/sanity_check.sql
+9
-0
src/test/regress/sql/tests
src/test/regress/sql/tests
+6
-0
No files found.
src/test/regress/expected/create_aggregate.out
0 → 100644
View file @
588ae64c
QUERY: CREATE AGGREGATE newavg (
sfunc1 = int4pl, basetype = int4, stype1 = int4,
sfunc2 = int4inc, stype2 = int4,
finalfunc = int4div,
initcond1 = '0', initcond2 = '0'
);
QUERY: CREATE AGGREGATE newsum (
sfunc1 = int4pl, basetype = int4, stype1 = int4,
initcond1 = '0'
);
QUERY: CREATE AGGREGATE newcnt (
sfunc2 = int4inc, basetype = int4, stype2 = int4,
initcond2 = '0'
);
src/test/regress/expected/create_index.out
0 → 100644
View file @
588ae64c
QUERY: CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
QUERY: CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
QUERY: CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
QUERY: CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 char16_ops);
QUERY: CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
QUERY: CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
QUERY: CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
QUERY: CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
QUERY: CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
QUERY: CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
QUERY: CREATE INDEX rix ON road USING btree (name text_ops);
QUERY: CREATE INDEX iix ON ihighway USING btree (name text_ops);
QUERY: CREATE INDEX six ON shighway USING btree (name text_ops);
QUERY: CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
QUERY: CREATE INDEX bt_c16_index ON bt_c16_heap USING btree (seqno char16_ops);
QUERY: CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
QUERY: CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
QUERY: CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops);
QUERY: CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
QUERY: CREATE INDEX hash_c16_index ON hash_c16_heap USING hash (random char16_ops);
QUERY: CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
QUERY: CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
src/test/regress/expected/create_operator.out
0 → 100644
View file @
588ae64c
QUERY: CREATE OPERATOR ## (
leftarg = path,
rightarg = path,
procedure = path_inter,
commutator = ##
);
QUERY: CREATE OPERATOR <% (
leftarg = point,
rightarg = circle,
procedure = pt_in_circle,
commutator = >=%
);
QUERY: CREATE OPERATOR @#@ (
rightarg = int4,
procedure = int4fac
);
QUERY: CREATE OPERATOR #@# (
leftarg = int4,
procedure = int4fac
);
QUERY: CREATE OPERATOR #%# (
leftarg = int4,
procedure = int4fac
);
src/test/regress/expected/create_view.out
0 → 100644
View file @
588ae64c
QUERY: CREATE VIEW street AS
SELECT r.name, r.thepath, c.cname AS cname
FROM road r, real_city c
WHERE c.outline ## r.thepath;
QUERY: CREATE VIEW iexit AS
SELECT ih.name, ih.thepath,
interpt_pp(ih.thepath, r.thepath) AS exit
FROM ihighway ih, ramp r
WHERE ih.thepath ## r.thepath;
QUERY: CREATE VIEW toyemp AS
SELECT name, age, location, 12*salary AS annualsal
FROM emp;
src/test/regress/expected/misc.out
0 → 100644
View file @
588ae64c
This diff is collapsed.
Click to expand it.
src/test/regress/expected/sanity_check.out
0 → 100644
View file @
588ae64c
QUERY: VACUUM;
QUERY: SELECT relname, relhasindex
FROM pg_class
WHERE relhasindex
ORDER BY relname;
relname |relhasindex
-------------+-----------
bt_c16_heap |t
bt_f8_heap |t
bt_i4_heap |t
bt_txt_heap |t
fast_emp4000 |t
hash_c16_heap|t
hash_f8_heap |t
hash_i4_heap |t
hash_txt_heap|t
ihighway |t
onek |t
pg_attribute |t
pg_class |t
pg_proc |t
pg_type |t
road |t
shighway |t
tenk1 |t
tenk2 |t
(19 rows)
src/test/regress/input/create_misc.source
View file @
588ae64c
...
...
@@ -268,184 +268,3 @@ INSERT INTO iportaltest (i, d, p)
INSERT INTO iportaltest (i, d, p)
VALUES (2, 89.05, '(4.0,3.0,2.0,1.0)'::polygon);
--
-- CREATE ancillary data structures (i.e. indices)
--
--
-- BTREE
--
CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops);
CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops);
CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops);
CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 char16_ops);
CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops);
CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops);
CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops);
CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops);
CREATE INDEX tenk2_unique2 ON tenk2 USING btree(unique2 int4_ops);
CREATE INDEX tenk2_hundred ON tenk2 USING btree(hundred int4_ops);
CREATE INDEX rix ON road USING btree (name text_ops);
CREATE INDEX iix ON ihighway USING btree (name text_ops);
CREATE INDEX six ON shighway USING btree (name text_ops);
--
-- BTREE ascending/descending cases
--
-- we load int4/text from pure descending data (each key is a new
-- low key) and c16/f8 from pure ascending data (each key is a new
-- high key). we had a bug where new low keys would sometimes be
-- "lost".
--
CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
CREATE INDEX bt_c16_index ON bt_c16_heap USING btree (seqno char16_ops);
CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
--
-- BTREE partial indices
-- partial indices are not supported in postgres95
--
--CREATE INDEX onek2_u1_prtl ON onek2 USING btree(unique1 int4_ops)
-- where onek2.unique1 < 20 or onek2.unique1 > 980;
--CREATE INDEX onek2_u2_prtl ON onek2 USING btree(unique2 int4_ops)
-- where onek2.stringu1 < 'B';
-- EXTEND INDEX onek2_u2_prtl where onek2.stringu1 < 'C';
-- EXTEND INDEX onek2_u2_prtl;
-- CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 char16_ops)
-- where onek2.stringu1 >= 'J' and onek2.stringu1 < 'K';
--
-- RTREE
--
-- rtrees use a quadratic page-splitting algorithm that takes a
-- really, really long time. we don't test all rtree opclasses
-- in the regression test (we check them USING the sequoia 2000
-- benchmark).
--
CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops);
--
-- HASH
--
CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops);
CREATE INDEX hash_c16_index ON hash_c16_heap USING hash (random char16_ops);
CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops);
CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops);
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
--
-- OPERATOR DEFINITIONS
--
CREATE OPERATOR ## (
leftarg = path,
rightarg = path,
procedure = path_inter,
commutator = ##
);
CREATE OPERATOR <% (
leftarg = point,
rightarg = circle,
procedure = pt_in_circle,
commutator = >=%
);
CREATE OPERATOR @#@ (
rightarg = int4, -- left unary
procedure = int4fac
);
CREATE OPERATOR #@# (
leftarg = int4, -- right unary
procedure = int4fac
);
CREATE OPERATOR #%# (
leftarg = int4, -- right unary
procedure = int4fac
);
--
-- VIRTUAL CLASS DEFINITIONS
-- (this also tests the query rewrite system)
--
CREATE VIEW street AS
SELECT r.name, r.thepath, c.cname AS cname
FROM road r, real_city c
WHERE c.outline ## r.thepath;
CREATE VIEW iexit AS
SELECT ih.name, ih.thepath,
interpt_pp(ih.thepath, r.thepath) AS exit
FROM ihighway ih, ramp r
WHERE ih.thepath ## r.thepath;
CREATE VIEW toyemp AS
SELECT name, age, location, 12*salary AS annualsal
FROM emp;
--
-- RULES ???
--
--
-- AGGREGATE DEFINITIONS
--
-- all functions CREATEd
CREATE AGGREGATE newavg (
sfunc1 = int4pl, basetype = int4, stype1 = int4,
sfunc2 = int4inc, stype2 = int4,
finalfunc = int4div,
initcond1 = '0', initcond2 = '0'
);
-- sfunc1 (value-dependent) only
CREATE AGGREGATE newsum (
sfunc1 = int4pl, basetype = int4, stype1 = int4,
initcond1 = '0'
);
-- sfunc2 (value-independent) only
CREATE AGGREGATE newcnt (
sfunc2 = int4inc, basetype = int4, stype2 = int4,
initcond2 = '0'
);
VACUUM;
--
-- sanity check, if we don't have indices the test will take years to
-- complete.
--
SELECT relname, relhasindex
FROM pg_class
WHERE relhasindex
ORDER BY relname;
src/test/regress/output/create_misc.source
View file @
588ae64c
This diff is collapsed.
Click to expand it.
src/test/regress/sql/create_aggregate.sql
0 → 100644
View file @
588ae64c
--
-- AGGREGATE DEFINITIONS
--
-- all functions CREATEd
CREATE
AGGREGATE
newavg
(
sfunc1
=
int4pl
,
basetype
=
int4
,
stype1
=
int4
,
sfunc2
=
int4inc
,
stype2
=
int4
,
finalfunc
=
int4div
,
initcond1
=
'0'
,
initcond2
=
'0'
);
-- sfunc1 (value-dependent) only
CREATE
AGGREGATE
newsum
(
sfunc1
=
int4pl
,
basetype
=
int4
,
stype1
=
int4
,
initcond1
=
'0'
);
-- sfunc2 (value-independent) only
CREATE
AGGREGATE
newcnt
(
sfunc2
=
int4inc
,
basetype
=
int4
,
stype2
=
int4
,
initcond2
=
'0'
);
VACUUM
;
src/test/regress/sql/create_index.sql
0 → 100644
View file @
588ae64c
--
-- CREATE ancillary data structures (i.e. indices)
--
--
-- BTREE
--
CREATE
INDEX
onek_unique1
ON
onek
USING
btree
(
unique1
int4_ops
);
CREATE
INDEX
onek_unique2
ON
onek
USING
btree
(
unique2
int4_ops
);
CREATE
INDEX
onek_hundred
ON
onek
USING
btree
(
hundred
int4_ops
);
CREATE
INDEX
onek_stringu1
ON
onek
USING
btree
(
stringu1
char16_ops
);
CREATE
INDEX
tenk1_unique1
ON
tenk1
USING
btree
(
unique1
int4_ops
);
CREATE
INDEX
tenk1_unique2
ON
tenk1
USING
btree
(
unique2
int4_ops
);
CREATE
INDEX
tenk1_hundred
ON
tenk1
USING
btree
(
hundred
int4_ops
);
CREATE
INDEX
tenk2_unique1
ON
tenk2
USING
btree
(
unique1
int4_ops
);
CREATE
INDEX
tenk2_unique2
ON
tenk2
USING
btree
(
unique2
int4_ops
);
CREATE
INDEX
tenk2_hundred
ON
tenk2
USING
btree
(
hundred
int4_ops
);
CREATE
INDEX
rix
ON
road
USING
btree
(
name
text_ops
);
CREATE
INDEX
iix
ON
ihighway
USING
btree
(
name
text_ops
);
CREATE
INDEX
six
ON
shighway
USING
btree
(
name
text_ops
);
--
-- BTREE ascending/descending cases
--
-- we load int4/text from pure descending data (each key is a new
-- low key) and c16/f8 from pure ascending data (each key is a new
-- high key). we had a bug where new low keys would sometimes be
-- "lost".
--
CREATE
INDEX
bt_i4_index
ON
bt_i4_heap
USING
btree
(
seqno
int4_ops
);
CREATE
INDEX
bt_c16_index
ON
bt_c16_heap
USING
btree
(
seqno
char16_ops
);
CREATE
INDEX
bt_txt_index
ON
bt_txt_heap
USING
btree
(
seqno
text_ops
);
CREATE
INDEX
bt_f8_index
ON
bt_f8_heap
USING
btree
(
seqno
float8_ops
);
--
-- BTREE partial indices
-- partial indices are not supported in postgres95
--
--CREATE INDEX onek2_u1_prtl ON onek2 USING btree(unique1 int4_ops)
-- where onek2.unique1 < 20 or onek2.unique1 > 980;
--CREATE INDEX onek2_u2_prtl ON onek2 USING btree(unique2 int4_ops)
-- where onek2.stringu1 < 'B';
-- EXTEND INDEX onek2_u2_prtl where onek2.stringu1 < 'C';
-- EXTEND INDEX onek2_u2_prtl;
-- CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 char16_ops)
-- where onek2.stringu1 >= 'J' and onek2.stringu1 < 'K';
--
-- RTREE
--
-- rtrees use a quadratic page-splitting algorithm that takes a
-- really, really long time. we don't test all rtree opclasses
-- in the regression test (we check them USING the sequoia 2000
-- benchmark).
--
CREATE
INDEX
rect2ind
ON
fast_emp4000
USING
rtree
(
home_base
bigbox_ops
);
--
-- HASH
--
CREATE
INDEX
hash_i4_index
ON
hash_i4_heap
USING
hash
(
random
int4_ops
);
CREATE
INDEX
hash_c16_index
ON
hash_c16_heap
USING
hash
(
random
char16_ops
);
CREATE
INDEX
hash_txt_index
ON
hash_txt_heap
USING
hash
(
random
text_ops
);
CREATE
INDEX
hash_f8_index
ON
hash_f8_heap
USING
hash
(
random
float8_ops
);
-- CREATE INDEX hash_ovfl_index ON hash_ovfl_heap USING hash (x int4_ops);
src/test/regress/sql/create_operator.sql
0 → 100644
View file @
588ae64c
--
-- OPERATOR DEFINITIONS
--
CREATE
OPERATOR
##
(
leftarg
=
path
,
rightarg
=
path
,
procedure
=
path_inter
,
commutator
=
##
);
CREATE
OPERATOR
<%
(
leftarg
=
point
,
rightarg
=
circle
,
procedure
=
pt_in_circle
,
commutator
=
>=%
);
CREATE
OPERATOR
@#@
(
rightarg
=
int4
,
-- left unary
procedure
=
int4fac
);
CREATE
OPERATOR
#@#
(
leftarg
=
int4
,
-- right unary
procedure
=
int4fac
);
CREATE
OPERATOR
#%#
(
leftarg
=
int4
,
-- right unary
procedure
=
int4fac
);
src/test/regress/sql/create_view.sql
0 → 100644
View file @
588ae64c
--
-- VIRTUAL CLASS DEFINITIONS
-- (this also tests the query rewrite system)
--
CREATE
VIEW
street
AS
SELECT
r
.
name
,
r
.
thepath
,
c
.
cname
AS
cname
FROM
road
r
,
real_city
c
WHERE
c
.
outline
##
r
.
thepath
;
CREATE
VIEW
iexit
AS
SELECT
ih
.
name
,
ih
.
thepath
,
interpt_pp
(
ih
.
thepath
,
r
.
thepath
)
AS
exit
FROM
ihighway
ih
,
ramp
r
WHERE
ih
.
thepath
##
r
.
thepath
;
CREATE
VIEW
toyemp
AS
SELECT
name
,
age
,
location
,
12
*
salary
AS
annualsal
FROM
emp
;
src/test/regress/sql/sanity_check.sql
0 → 100644
View file @
588ae64c
--
-- sanity check, if we don't have indices the test will take years to
-- complete.
--
SELECT
relname
,
relhasindex
FROM
pg_class
WHERE
relhasindex
ORDER
BY
relname
;
src/test/regress/sql/tests
View file @
588ae64c
...
...
@@ -2,6 +2,11 @@ create_function
create_type
create_table
create_misc
create_aggregate
create_view
create_operator
create_index
sanity_check
reltime
abstime
boolean
...
...
@@ -23,3 +28,4 @@ point
polygon
text
tinterval
misc
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