Commit ee28d8b3 authored by Tom Lane's avatar Tom Lane

plpgsql regress tests seem a tad out of date ... repair bit rot.

parent e91932eb
QUERY: create table Room (
create table Room (
roomno char(8),
comment text
);
QUERY: create unique index Room_rno on Room using btree (roomno bpchar_ops);
QUERY: create table WSlot (
create unique index Room_rno on Room using btree (roomno bpchar_ops);
create table WSlot (
slotname char(20),
roomno char(8),
slotlink char(20),
backlink char(20)
);
QUERY: create unique index WSlot_name on WSlot using btree (slotname bpchar_ops);
QUERY: create table PField (
create unique index WSlot_name on WSlot using btree (slotname bpchar_ops);
create table PField (
name text,
comment text
);
QUERY: create unique index PField_name on PField using btree (name text_ops);
QUERY: create table PSlot (
create unique index PField_name on PField using btree (name text_ops);
create table PSlot (
slotname char(20),
pfname text,
slotlink char(20),
backlink char(20)
);
QUERY: create unique index PSlot_name on PSlot using btree (slotname bpchar_ops);
QUERY: create table PLine (
create unique index PSlot_name on PSlot using btree (slotname bpchar_ops);
create table PLine (
slotname char(20),
phonenumber char(20),
comment text,
backlink char(20)
);
QUERY: create unique index PLine_name on PLine using btree (slotname bpchar_ops);
QUERY: create table Hub (
create unique index PLine_name on PLine using btree (slotname bpchar_ops);
create table Hub (
name char(14),
comment text,
nslots integer
);
QUERY: create unique index Hub_name on Hub using btree (name bpchar_ops);
QUERY: create table HSlot (
create unique index Hub_name on Hub using btree (name bpchar_ops);
create table HSlot (
slotname char(20),
hubname char(14),
slotno integer,
slotlink char(20)
);
QUERY: create unique index HSlot_name on HSlot using btree (slotname bpchar_ops);
QUERY: create index HSlot_hubname on HSlot using btree (hubname bpchar_ops);
QUERY: create table System (
create unique index HSlot_name on HSlot using btree (slotname bpchar_ops);
create index HSlot_hubname on HSlot using btree (hubname bpchar_ops);
create table System (
name text,
comment text
);
QUERY: create unique index System_name on System using btree (name text_ops);
QUERY: create table IFace (
create unique index System_name on System using btree (name text_ops);
create table IFace (
slotname char(20),
sysname text,
ifname text,
slotlink char(20)
);
QUERY: create unique index IFace_name on IFace using btree (slotname bpchar_ops);
QUERY: create table PHone (
create unique index IFace_name on IFace using btree (slotname bpchar_ops);
create table PHone (
slotname char(20),
comment text,
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);
This diff is collapsed.
This diff is collapsed.
QUERY: create function pslot_backlink_view(bpchar)
create function pslot_backlink_view(bpchar)
returns text as '
<<outer>>
declare
......@@ -38,7 +38,7 @@ begin
return rec.backlink;
end;
' language 'plpgsql';
QUERY: create function pslot_slotlink_view(bpchar)
create function pslot_slotlink_view(bpchar)
returns text as '
declare
psrec record;
......@@ -69,7 +69,7 @@ begin
return psrec.slotlink;
end;
' language 'plpgsql';
QUERY: create function wslot_slotlink_view(bpchar)
create function wslot_slotlink_view(bpchar)
returns text as '
declare
rec record;
......@@ -114,7 +114,7 @@ begin
return rec.slotlink;
end;
' 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_slotlink_view(PF.slotname) as patch
from PSlot PF;
--
-- 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';
......@@ -3,17 +3,17 @@
DB=plpgsql_test
export DB
FRONTEND="psql -n -e -q"
FRONTEND="psql -e -q -X"
export FRONTEND
echo "*** destroy old $DB database ***"
destroydb $DB
dropdb $DB
echo "*** create new $DB database ***"
createdb $DB
echo "*** install PL/pgSQL ***"
$FRONTEND -f mklang.sql -d $DB >/dev/null 2>&1
createlang plpgsql $DB
echo "*** create tables ***"
$FRONTEND -f tables.sql -d $DB >output/tables.out 2>&1
......
......@@ -3,7 +3,7 @@
-- * Trigger procedures and functions for the patchfield
-- * 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
if mytype = ''PS'' then
select into rec * from PSlot where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.backlink != blname then
update PSlot set backlink = blname where slotname = myname;
......@@ -613,7 +613,7 @@ begin
if mytype = ''WS'' then
select into rec * from WSlot where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.backlink != blname then
update WSlot set backlink = blname where slotname = myname;
......@@ -623,7 +623,7 @@ begin
if mytype = ''PL'' then
select into rec * from PLine where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.backlink != blname then
update PLine set backlink = blname where slotname = myname;
......@@ -771,7 +771,7 @@ begin
if mytype = ''PS'' then
select into rec * from PSlot where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.slotlink != blname then
update PSlot set slotlink = blname where slotname = myname;
......@@ -781,7 +781,7 @@ begin
if mytype = ''WS'' then
select into rec * from WSlot where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.slotlink != blname then
update WSlot set slotlink = blname where slotname = myname;
......@@ -791,7 +791,7 @@ begin
if mytype = ''IF'' then
select into rec * from IFace where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.slotlink != blname then
update IFace set slotlink = blname where slotname = myname;
......@@ -801,7 +801,7 @@ begin
if mytype = ''HS'' then
select into rec * from HSlot where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.slotlink != blname then
update HSlot set slotlink = blname where slotname = myname;
......@@ -811,7 +811,7 @@ begin
if mytype = ''PH'' then
select into rec * from PHone where slotname = myname;
if not found then
raise exception ''% does not exists'', myname;
raise exception ''% does not exist'', myname;
end if;
if rec.slotlink != blname then
update PHone set slotlink = blname where slotname = myname;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment