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
ee28d8b3
Commit
ee28d8b3
authored
Oct 22, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plpgsql regress tests seem a tad out of date ... repair bit rot.
parent
e91932eb
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
557 additions
and
571 deletions
+557
-571
src/pl/plpgsql/test/expected/tables.out
src/pl/plpgsql/test/expected/tables.out
+21
-21
src/pl/plpgsql/test/expected/test.out
src/pl/plpgsql/test/expected/test.out
+441
-441
src/pl/plpgsql/test/expected/triggers.out
src/pl/plpgsql/test/expected/triggers.out
+79
-79
src/pl/plpgsql/test/expected/views.out
src/pl/plpgsql/test/expected/views.out
+4
-4
src/pl/plpgsql/test/mklang.sql
src/pl/plpgsql/test/mklang.sql
+0
-14
src/pl/plpgsql/test/runtest
src/pl/plpgsql/test/runtest
+3
-3
src/pl/plpgsql/test/triggers.sql
src/pl/plpgsql/test/triggers.sql
+9
-9
No files found.
src/pl/plpgsql/test/expected/tables.out
View file @
ee28d8b3
QUERY:
create table Room (
create table Room (
roomno char(8),
roomno char(8),
comment text
comment text
);
);
QUERY:
create unique index Room_rno on Room using btree (roomno bpchar_ops);
create unique index Room_rno on Room using btree (roomno bpchar_ops);
QUERY:
create table WSlot (
create table WSlot (
slotname char(20),
slotname char(20),
roomno char(8),
roomno char(8),
slotlink char(20),
slotlink char(20),
backlink char(20)
backlink char(20)
);
);
QUERY:
create unique index WSlot_name on WSlot using btree (slotname bpchar_ops);
create unique index WSlot_name on WSlot using btree (slotname bpchar_ops);
QUERY:
create table PField (
create table PField (
name text,
name text,
comment text
comment text
);
);
QUERY:
create unique index PField_name on PField using btree (name text_ops);
create unique index PField_name on PField using btree (name text_ops);
QUERY:
create table PSlot (
create table PSlot (
slotname char(20),
slotname char(20),
pfname text,
pfname text,
slotlink char(20),
slotlink char(20),
backlink char(20)
backlink char(20)
);
);
QUERY:
create unique index PSlot_name on PSlot using btree (slotname bpchar_ops);
create unique index PSlot_name on PSlot using btree (slotname bpchar_ops);
QUERY:
create table PLine (
create table PLine (
slotname char(20),
slotname char(20),
phonenumber char(20),
phonenumber char(20),
comment text,
comment text,
backlink char(20)
backlink char(20)
);
);
QUERY:
create unique index PLine_name on PLine using btree (slotname bpchar_ops);
create unique index PLine_name on PLine using btree (slotname bpchar_ops);
QUERY:
create table Hub (
create table Hub (
name char(14),
name char(14),
comment text,
comment text,
nslots integer
nslots integer
);
);
QUERY:
create unique index Hub_name on Hub using btree (name bpchar_ops);
create unique index Hub_name on Hub using btree (name bpchar_ops);
QUERY:
create table HSlot (
create table HSlot (
slotname char(20),
slotname char(20),
hubname char(14),
hubname char(14),
slotno integer,
slotno integer,
slotlink char(20)
slotlink char(20)
);
);
QUERY:
create unique index HSlot_name on HSlot using btree (slotname bpchar_ops);
create unique index HSlot_name on HSlot using btree (slotname bpchar_ops);
QUERY:
create index HSlot_hubname on HSlot using btree (hubname bpchar_ops);
create index HSlot_hubname on HSlot using btree (hubname bpchar_ops);
QUERY:
create table System (
create table System (
name text,
name text,
comment text
comment text
);
);
QUERY:
create unique index System_name on System using btree (name text_ops);
create unique index System_name on System using btree (name text_ops);
QUERY:
create table IFace (
create table IFace (
slotname char(20),
slotname char(20),
sysname text,
sysname text,
ifname text,
ifname text,
slotlink char(20)
slotlink char(20)
);
);
QUERY:
create unique index IFace_name on IFace using btree (slotname bpchar_ops);
create unique index IFace_name on IFace using btree (slotname bpchar_ops);
QUERY:
create table PHone (
create table PHone (
slotname char(20),
slotname char(20),
comment text,
comment text,
slotlink char(20)
slotlink char(20)
);
);
QUERY:
create unique index PHone_name on PHone using btree (slotname bpchar_ops);
create unique index PHone_name on PHone using btree (slotname bpchar_ops);
src/pl/plpgsql/test/expected/test.out
View file @
ee28d8b3
This diff is collapsed.
Click to expand it.
src/pl/plpgsql/test/expected/triggers.out
View file @
ee28d8b3
This diff is collapsed.
Click to expand it.
src/pl/plpgsql/test/expected/views.out
View file @
ee28d8b3
QUERY:
create function pslot_backlink_view(bpchar)
create function pslot_backlink_view(bpchar)
returns text as '
returns text as '
<<outer>>
<<outer>>
declare
declare
...
@@ -38,7 +38,7 @@ begin
...
@@ -38,7 +38,7 @@ begin
return rec.backlink;
return rec.backlink;
end;
end;
' language 'plpgsql';
' language 'plpgsql';
QUERY:
create function pslot_slotlink_view(bpchar)
create function pslot_slotlink_view(bpchar)
returns text as '
returns text as '
declare
declare
psrec record;
psrec record;
...
@@ -69,7 +69,7 @@ begin
...
@@ -69,7 +69,7 @@ begin
return psrec.slotlink;
return psrec.slotlink;
end;
end;
' language 'plpgsql';
' language 'plpgsql';
QUERY:
create function wslot_slotlink_view(bpchar)
create function wslot_slotlink_view(bpchar)
returns text as '
returns text as '
declare
declare
rec record;
rec record;
...
@@ -114,7 +114,7 @@ begin
...
@@ -114,7 +114,7 @@ begin
return rec.slotlink;
return rec.slotlink;
end;
end;
' language 'plpgsql';
' language 'plpgsql';
QUERY:
create view Pfield_v1 as select PF.pfname, PF.slotname,
create view Pfield_v1 as select PF.pfname, PF.slotname,
pslot_backlink_view(PF.slotname) as backside,
pslot_backlink_view(PF.slotname) as backside,
pslot_slotlink_view(PF.slotname) as patch
pslot_slotlink_view(PF.slotname) as patch
from PSlot PF;
from PSlot PF;
src/pl/plpgsql/test/mklang.sql
deleted
100644 → 0
View file @
e91932eb
--
-- PL/pgSQL language declaration
--
-- $Header: /cvsroot/pgsql/src/pl/plpgsql/test/Attic/mklang.sql,v 1.1 1998/08/24 19:16:27 momjian Exp $
--
create
function
plpgsql_call_handler
()
returns
opaque
as
'/usr/local/pgsql/lib/plpgsql.so'
language
'C'
;
create
trusted
procedural
language
'plpgsql'
handler
plpgsql_call_handler
lancompiler
'PL/pgSQL'
;
src/pl/plpgsql/test/runtest
View file @
ee28d8b3
...
@@ -3,17 +3,17 @@
...
@@ -3,17 +3,17 @@
DB
=
plpgsql_test
DB
=
plpgsql_test
export
DB
export
DB
FRONTEND
=
"psql -
n -e -q
"
FRONTEND
=
"psql -
e -q -X
"
export
FRONTEND
export
FRONTEND
echo
"*** destroy old
$DB
database ***"
echo
"*** destroy old
$DB
database ***"
d
estroy
db
$DB
d
rop
db
$DB
echo
"*** create new
$DB
database ***"
echo
"*** create new
$DB
database ***"
createdb
$DB
createdb
$DB
echo
"*** install PL/pgSQL ***"
echo
"*** install PL/pgSQL ***"
$FRONTEND
-f
mklang.sql
-d
$DB
>
/dev/null 2>&1
createlang plpgsql
$DB
echo
"*** create tables ***"
echo
"*** create tables ***"
$FRONTEND
-f
tables.sql
-d
$DB
>
output/tables.out 2>&1
$FRONTEND
-f
tables.sql
-d
$DB
>
output/tables.out 2>&1
...
...
src/pl/plpgsql/test/triggers.sql
View file @
ee28d8b3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-- * Trigger procedures and functions for the patchfield
-- * Trigger procedures and functions for the patchfield
-- * test of PL/pgSQL
-- * test of PL/pgSQL
-- *
-- *
-- * $Header: /cvsroot/pgsql/src/pl/plpgsql/test/Attic/triggers.sql,v 1.
1 1998/08/24 19:16:27 momjian
Exp $
-- * $Header: /cvsroot/pgsql/src/pl/plpgsql/test/Attic/triggers.sql,v 1.
2 2000/10/22 23:25:11 tgl
Exp $
-- *
-- *
-- ************************************************************
-- ************************************************************
...
@@ -603,7 +603,7 @@ begin
...
@@ -603,7 +603,7 @@ begin
if mytype =
''
PS
''
then
if mytype =
''
PS
''
then
select into rec * from PSlot where slotname = myname;
select into rec * from PSlot where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.backlink != blname then
if rec.backlink != blname then
update PSlot set backlink = blname where slotname = myname;
update PSlot set backlink = blname where slotname = myname;
...
@@ -613,7 +613,7 @@ begin
...
@@ -613,7 +613,7 @@ begin
if mytype =
''
WS
''
then
if mytype =
''
WS
''
then
select into rec * from WSlot where slotname = myname;
select into rec * from WSlot where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.backlink != blname then
if rec.backlink != blname then
update WSlot set backlink = blname where slotname = myname;
update WSlot set backlink = blname where slotname = myname;
...
@@ -623,7 +623,7 @@ begin
...
@@ -623,7 +623,7 @@ begin
if mytype =
''
PL
''
then
if mytype =
''
PL
''
then
select into rec * from PLine where slotname = myname;
select into rec * from PLine where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.backlink != blname then
if rec.backlink != blname then
update PLine set backlink = blname where slotname = myname;
update PLine set backlink = blname where slotname = myname;
...
@@ -771,7 +771,7 @@ begin
...
@@ -771,7 +771,7 @@ begin
if mytype =
''
PS
''
then
if mytype =
''
PS
''
then
select into rec * from PSlot where slotname = myname;
select into rec * from PSlot where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.slotlink != blname then
if rec.slotlink != blname then
update PSlot set slotlink = blname where slotname = myname;
update PSlot set slotlink = blname where slotname = myname;
...
@@ -781,7 +781,7 @@ begin
...
@@ -781,7 +781,7 @@ begin
if mytype =
''
WS
''
then
if mytype =
''
WS
''
then
select into rec * from WSlot where slotname = myname;
select into rec * from WSlot where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.slotlink != blname then
if rec.slotlink != blname then
update WSlot set slotlink = blname where slotname = myname;
update WSlot set slotlink = blname where slotname = myname;
...
@@ -791,7 +791,7 @@ begin
...
@@ -791,7 +791,7 @@ begin
if mytype =
''
IF
''
then
if mytype =
''
IF
''
then
select into rec * from IFace where slotname = myname;
select into rec * from IFace where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.slotlink != blname then
if rec.slotlink != blname then
update IFace set slotlink = blname where slotname = myname;
update IFace set slotlink = blname where slotname = myname;
...
@@ -801,7 +801,7 @@ begin
...
@@ -801,7 +801,7 @@ begin
if mytype =
''
HS
''
then
if mytype =
''
HS
''
then
select into rec * from HSlot where slotname = myname;
select into rec * from HSlot where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.slotlink != blname then
if rec.slotlink != blname then
update HSlot set slotlink = blname where slotname = myname;
update HSlot set slotlink = blname where slotname = myname;
...
@@ -811,7 +811,7 @@ begin
...
@@ -811,7 +811,7 @@ begin
if mytype =
''
PH
''
then
if mytype =
''
PH
''
then
select into rec * from PHone where slotname = myname;
select into rec * from PHone where slotname = myname;
if not found then
if not found then
raise exception
''
% does not exist
s
''
, myname;
raise exception
''
% does not exist
''
, myname;
end if;
end if;
if rec.slotlink != blname then
if rec.slotlink != blname then
update PHone set slotlink = blname where slotname = myname;
update PHone set slotlink = blname where slotname = myname;
...
...
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