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
4e859c3c
Commit
4e859c3c
authored
Jun 09, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add inherit regression files.
parent
dbf2fd2e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
628 additions
and
0 deletions
+628
-0
src/test/regress/expected/inherit.out
src/test/regress/expected/inherit.out
+534
-0
src/test/regress/sql/inherit.sql
src/test/regress/sql/inherit.sql
+94
-0
No files found.
src/test/regress/expected/inherit.out
0 → 100644
View file @
4e859c3c
--
-- Test inheritance features
--
CREATE TABLE a (aa TEXT);
CREATE TABLE b UNDER a (bb TEXT);
CREATE TABLE c UNDER a (cc TEXT);
CREATE TABLE d UNDER b,c,a (dd TEXT);
INSERT INTO a(aa) VALUES('aaa');
INSERT INTO a(aa) VALUES('aaaa');
INSERT INTO a(aa) VALUES('aaaaa');
INSERT INTO a(aa) VALUES('aaaaaa');
INSERT INTO a(aa) VALUES('aaaaaaa');
INSERT INTO a(aa) VALUES('aaaaaaaa');
INSERT INTO b(aa) VALUES('bbb');
INSERT INTO b(aa) VALUES('bbbb');
INSERT INTO b(aa) VALUES('bbbbb');
INSERT INTO b(aa) VALUES('bbbbbb');
INSERT INTO b(aa) VALUES('bbbbbbb');
INSERT INTO b(aa) VALUES('bbbbbbbb');
INSERT INTO c(aa) VALUES('ccc');
INSERT INTO c(aa) VALUES('cccc');
INSERT INTO c(aa) VALUES('ccccc');
INSERT INTO c(aa) VALUES('cccccc');
INSERT INTO c(aa) VALUES('ccccccc');
INSERT INTO c(aa) VALUES('cccccccc');
INSERT INTO d(aa) VALUES('ddd');
INSERT INTO d(aa) VALUES('dddd');
INSERT INTO d(aa) VALUES('ddddd');
INSERT INTO d(aa) VALUES('dddddd');
INSERT INTO d(aa) VALUES('ddddddd');
INSERT INTO d(aa) VALUES('dddddddd');
SELECT * FROM a;
aa
----------
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
bbb
bbbb
bbbbb
bbbbbb
bbbbbbb
bbbbbbbb
ccc
cccc
ccccc
cccccc
ccccccc
cccccccc
ddd
dddd
ddddd
dddddd
ddddddd
dddddddd
(24 rows)
SELECT * FROM b;
aa | bb
----------+----
bbb |
bbbb |
bbbbb |
bbbbbb |
bbbbbbb |
bbbbbbbb |
ddd |
dddd |
ddddd |
dddddd |
ddddddd |
dddddddd |
(12 rows)
SELECT * FROM c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
ddd |
dddd |
ddddd |
dddddd |
ddddddd |
dddddddd |
(12 rows)
SELECT * FROM d;
aa | bb | cc | dd
----------+----+----+----
ddd | | |
dddd | | |
ddddd | | |
dddddd | | |
ddddddd | | |
dddddddd | | |
(6 rows)
SELECT * FROM ONLY a;
aa
----------
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaaaaa
(6 rows)
SELECT * FROM ONLY b;
aa | bb
----------+----
bbb |
bbbb |
bbbbb |
bbbbbb |
bbbbbbb |
bbbbbbbb |
(6 rows)
SELECT * FROM ONLY c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
(6 rows)
SELECT * FROM ONLY d;
aa | bb | cc | dd
----------+----+----+----
ddd | | |
dddd | | |
ddddd | | |
dddddd | | |
ddddddd | | |
dddddddd | | |
(6 rows)
UPDATE a SET aa='zzzz' WHERE aa='aaaa';
UPDATE ONLY a SET aa='zzzzz' WHERE aa='aaaaa';
UPDATE b SET aa='zzz' WHERE aa='aaa';
UPDATE ONLY b SET aa='zzz' WHERE aa='aaa';
UPDATE a SET aa='zzzzzz' WHERE aa LIKE 'aaa%';
SELECT * FROM a;
aa
----------
zzzz
zzzzz
zzzzzz
zzzzzz
zzzzzz
zzzzzz
bbb
bbbb
bbbbb
bbbbbb
bbbbbbb
bbbbbbbb
ccc
cccc
ccccc
cccccc
ccccccc
cccccccc
ddd
dddd
ddddd
dddddd
ddddddd
dddddddd
(24 rows)
SELECT * FROM b;
aa | bb
----------+----
bbb |
bbbb |
bbbbb |
bbbbbb |
bbbbbbb |
bbbbbbbb |
ddd |
dddd |
ddddd |
dddddd |
ddddddd |
dddddddd |
(12 rows)
SELECT * FROM c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
ddd |
dddd |
ddddd |
dddddd |
ddddddd |
dddddddd |
(12 rows)
SELECT * FROM d;
aa | bb | cc | dd
----------+----+----+----
ddd | | |
dddd | | |
ddddd | | |
dddddd | | |
ddddddd | | |
dddddddd | | |
(6 rows)
SELECT * FROM ONLY a;
aa
--------
zzzz
zzzzz
zzzzzz
zzzzzz
zzzzzz
zzzzzz
(6 rows)
SELECT * FROM ONLY b;
aa | bb
----------+----
bbb |
bbbb |
bbbbb |
bbbbbb |
bbbbbbb |
bbbbbbbb |
(6 rows)
SELECT * FROM ONLY c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
(6 rows)
SELECT * FROM ONLY d;
aa | bb | cc | dd
----------+----+----+----
ddd | | |
dddd | | |
ddddd | | |
dddddd | | |
ddddddd | | |
dddddddd | | |
(6 rows)
UPDATE b SET aa='new';
SELECT * FROM a;
aa
----------
zzzz
zzzzz
zzzzzz
zzzzzz
zzzzzz
zzzzzz
new
new
new
new
new
new
ccc
cccc
ccccc
cccccc
ccccccc
cccccccc
new
new
new
new
new
new
(24 rows)
SELECT * FROM b;
aa | bb
-----+----
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
(12 rows)
SELECT * FROM c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
new |
new |
new |
new |
new |
new |
(12 rows)
SELECT * FROM d;
aa | bb | cc | dd
-----+----+----+----
new | | |
new | | |
new | | |
new | | |
new | | |
new | | |
(6 rows)
SELECT * FROM ONLY a;
aa
--------
zzzz
zzzzz
zzzzzz
zzzzzz
zzzzzz
zzzzzz
(6 rows)
SELECT * FROM ONLY b;
aa | bb
-----+----
new |
new |
new |
new |
new |
new |
(6 rows)
SELECT * FROM ONLY c;
aa | cc
----------+----
ccc |
cccc |
ccccc |
cccccc |
ccccccc |
cccccccc |
(6 rows)
SELECT * FROM ONLY d;
aa | bb | cc | dd
-----+----+----+----
new | | |
new | | |
new | | |
new | | |
new | | |
new | | |
(6 rows)
UPDATE a SET aa='new';
DELETE FROM ONLY c WHERE aa='new';
SELECT * FROM a;
aa
-----
new
new
new
new
new
new
new
new
new
new
new
new
new
new
new
new
new
new
(18 rows)
SELECT * FROM b;
aa | bb
-----+----
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
new |
(12 rows)
SELECT * FROM c;
aa | cc
-----+----
new |
new |
new |
new |
new |
new |
(6 rows)
SELECT * FROM d;
aa | bb | cc | dd
-----+----+----+----
new | | |
new | | |
new | | |
new | | |
new | | |
new | | |
(6 rows)
SELECT * FROM ONLY a;
aa
-----
new
new
new
new
new
new
(6 rows)
SELECT * FROM ONLY b;
aa | bb
-----+----
new |
new |
new |
new |
new |
new |
(6 rows)
SELECT * FROM ONLY c;
aa | cc
----+----
(0 rows)
SELECT * FROM ONLY d;
aa | bb | cc | dd
-----+----+----+----
new | | |
new | | |
new | | |
new | | |
new | | |
new | | |
(6 rows)
DELETE FROM a;
SELECT * FROM a;
aa
----
(0 rows)
SELECT * FROM b;
aa | bb
----+----
(0 rows)
SELECT * FROM c;
aa | cc
----+----
(0 rows)
SELECT * FROM d;
aa | bb | cc | dd
----+----+----+----
(0 rows)
SELECT * FROM ONLY a;
aa
----
(0 rows)
SELECT * FROM ONLY b;
aa | bb
----+----
(0 rows)
SELECT * FROM ONLY c;
aa | cc
----+----
(0 rows)
SELECT * FROM ONLY d;
aa | bb | cc | dd
----+----+----+----
(0 rows)
src/test/regress/sql/inherit.sql
0 → 100644
View file @
4e859c3c
--
-- Test inheritance features
--
CREATE
TABLE
a
(
aa
TEXT
);
CREATE
TABLE
b
UNDER
a
(
bb
TEXT
);
CREATE
TABLE
c
UNDER
a
(
cc
TEXT
);
CREATE
TABLE
d
UNDER
b
,
c
,
a
(
dd
TEXT
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaa'
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaaa'
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaaaa'
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaaaaa'
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaaaaaa'
);
INSERT
INTO
a
(
aa
)
VALUES
(
'aaaaaaaa'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbb'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbbb'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbbbb'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbbbbb'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbbbbbb'
);
INSERT
INTO
b
(
aa
)
VALUES
(
'bbbbbbbb'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'ccc'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'cccc'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'ccccc'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'cccccc'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'ccccccc'
);
INSERT
INTO
c
(
aa
)
VALUES
(
'cccccccc'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'ddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'dddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'ddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'dddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'ddddddd'
);
INSERT
INTO
d
(
aa
)
VALUES
(
'dddddddd'
);
SELECT
*
FROM
a
;
SELECT
*
FROM
b
;
SELECT
*
FROM
c
;
SELECT
*
FROM
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
*
FROM
ONLY
b
;
SELECT
*
FROM
ONLY
c
;
SELECT
*
FROM
ONLY
d
;
UPDATE
a
SET
aa
=
'zzzz'
WHERE
aa
=
'aaaa'
;
UPDATE
ONLY
a
SET
aa
=
'zzzzz'
WHERE
aa
=
'aaaaa'
;
UPDATE
b
SET
aa
=
'zzz'
WHERE
aa
=
'aaa'
;
UPDATE
ONLY
b
SET
aa
=
'zzz'
WHERE
aa
=
'aaa'
;
UPDATE
a
SET
aa
=
'zzzzzz'
WHERE
aa
LIKE
'aaa%'
;
SELECT
*
FROM
a
;
SELECT
*
FROM
b
;
SELECT
*
FROM
c
;
SELECT
*
FROM
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
*
FROM
ONLY
b
;
SELECT
*
FROM
ONLY
c
;
SELECT
*
FROM
ONLY
d
;
UPDATE
b
SET
aa
=
'new'
;
SELECT
*
FROM
a
;
SELECT
*
FROM
b
;
SELECT
*
FROM
c
;
SELECT
*
FROM
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
*
FROM
ONLY
b
;
SELECT
*
FROM
ONLY
c
;
SELECT
*
FROM
ONLY
d
;
UPDATE
a
SET
aa
=
'new'
;
DELETE
FROM
ONLY
c
WHERE
aa
=
'new'
;
SELECT
*
FROM
a
;
SELECT
*
FROM
b
;
SELECT
*
FROM
c
;
SELECT
*
FROM
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
*
FROM
ONLY
b
;
SELECT
*
FROM
ONLY
c
;
SELECT
*
FROM
ONLY
d
;
DELETE
FROM
a
;
SELECT
*
FROM
a
;
SELECT
*
FROM
b
;
SELECT
*
FROM
c
;
SELECT
*
FROM
d
;
SELECT
*
FROM
ONLY
a
;
SELECT
*
FROM
ONLY
b
;
SELECT
*
FROM
ONLY
c
;
SELECT
*
FROM
ONLY
d
;
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