mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
plpgsql regress tests seem a tad out of date ... repair bit rot.
This commit is contained in:
@ -1,63 +1,63 @@
|
|||||||
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);
|
||||||
|
@ -1,473 +1,473 @@
|
|||||||
QUERY: insert into Room values ('001', 'Entrance');
|
insert into Room values ('001', 'Entrance');
|
||||||
QUERY: insert into Room values ('002', 'Office');
|
insert into Room values ('002', 'Office');
|
||||||
QUERY: insert into Room values ('003', 'Office');
|
insert into Room values ('003', 'Office');
|
||||||
QUERY: insert into Room values ('004', 'Technical');
|
insert into Room values ('004', 'Technical');
|
||||||
QUERY: insert into Room values ('101', 'Office');
|
insert into Room values ('101', 'Office');
|
||||||
QUERY: insert into Room values ('102', 'Conference');
|
insert into Room values ('102', 'Conference');
|
||||||
QUERY: insert into Room values ('103', 'Restroom');
|
insert into Room values ('103', 'Restroom');
|
||||||
QUERY: insert into Room values ('104', 'Technical');
|
insert into Room values ('104', 'Technical');
|
||||||
QUERY: insert into Room values ('105', 'Office');
|
insert into Room values ('105', 'Office');
|
||||||
QUERY: insert into Room values ('106', 'Office');
|
insert into Room values ('106', 'Office');
|
||||||
QUERY: insert into WSlot values ('WS.001.1a', '001', '', '');
|
insert into WSlot values ('WS.001.1a', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.001.1b', '001', '', '');
|
insert into WSlot values ('WS.001.1b', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.001.2a', '001', '', '');
|
insert into WSlot values ('WS.001.2a', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.001.2b', '001', '', '');
|
insert into WSlot values ('WS.001.2b', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.001.3a', '001', '', '');
|
insert into WSlot values ('WS.001.3a', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.001.3b', '001', '', '');
|
insert into WSlot values ('WS.001.3b', '001', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.1a', '002', '', '');
|
insert into WSlot values ('WS.002.1a', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.1b', '002', '', '');
|
insert into WSlot values ('WS.002.1b', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.2a', '002', '', '');
|
insert into WSlot values ('WS.002.2a', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.2b', '002', '', '');
|
insert into WSlot values ('WS.002.2b', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.3a', '002', '', '');
|
insert into WSlot values ('WS.002.3a', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.002.3b', '002', '', '');
|
insert into WSlot values ('WS.002.3b', '002', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.1a', '003', '', '');
|
insert into WSlot values ('WS.003.1a', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.1b', '003', '', '');
|
insert into WSlot values ('WS.003.1b', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.2a', '003', '', '');
|
insert into WSlot values ('WS.003.2a', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.2b', '003', '', '');
|
insert into WSlot values ('WS.003.2b', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.3a', '003', '', '');
|
insert into WSlot values ('WS.003.3a', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.003.3b', '003', '', '');
|
insert into WSlot values ('WS.003.3b', '003', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.1a', '101', '', '');
|
insert into WSlot values ('WS.101.1a', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.1b', '101', '', '');
|
insert into WSlot values ('WS.101.1b', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.2a', '101', '', '');
|
insert into WSlot values ('WS.101.2a', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.2b', '101', '', '');
|
insert into WSlot values ('WS.101.2b', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.3a', '101', '', '');
|
insert into WSlot values ('WS.101.3a', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.101.3b', '101', '', '');
|
insert into WSlot values ('WS.101.3b', '101', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.1a', '102', '', '');
|
insert into WSlot values ('WS.102.1a', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.1b', '102', '', '');
|
insert into WSlot values ('WS.102.1b', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.2a', '102', '', '');
|
insert into WSlot values ('WS.102.2a', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.2b', '102', '', '');
|
insert into WSlot values ('WS.102.2b', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.3a', '102', '', '');
|
insert into WSlot values ('WS.102.3a', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.102.3b', '102', '', '');
|
insert into WSlot values ('WS.102.3b', '102', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.1a', '105', '', '');
|
insert into WSlot values ('WS.105.1a', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.1b', '105', '', '');
|
insert into WSlot values ('WS.105.1b', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.2a', '105', '', '');
|
insert into WSlot values ('WS.105.2a', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.2b', '105', '', '');
|
insert into WSlot values ('WS.105.2b', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.3a', '105', '', '');
|
insert into WSlot values ('WS.105.3a', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.105.3b', '105', '', '');
|
insert into WSlot values ('WS.105.3b', '105', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.1a', '106', '', '');
|
insert into WSlot values ('WS.106.1a', '106', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.1b', '106', '', '');
|
insert into WSlot values ('WS.106.1b', '106', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.2a', '106', '', '');
|
insert into WSlot values ('WS.106.2a', '106', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.2b', '106', '', '');
|
insert into WSlot values ('WS.106.2b', '106', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.3a', '106', '', '');
|
insert into WSlot values ('WS.106.3a', '106', '', '');
|
||||||
QUERY: insert into WSlot values ('WS.106.3b', '106', '', '');
|
insert into WSlot values ('WS.106.3b', '106', '', '');
|
||||||
QUERY: insert into PField values ('PF0_1', 'Wallslots basement');
|
insert into PField values ('PF0_1', 'Wallslots basement');
|
||||||
QUERY: insert into PSlot values ('PS.base.a1', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a1', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.a2', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a2', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.a3', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a3', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.a4', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a4', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.a5', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a5', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.a6', 'PF0_1', '', '');
|
insert into PSlot values ('PS.base.a6', 'PF0_1', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.b1', 'PF0_1', '', 'WS.002.1a');
|
insert into PSlot values ('PS.base.b1', 'PF0_1', '', 'WS.002.1a');
|
||||||
QUERY: insert into PSlot values ('PS.base.b2', 'PF0_1', '', 'WS.002.1b');
|
insert into PSlot values ('PS.base.b2', 'PF0_1', '', 'WS.002.1b');
|
||||||
QUERY: insert into PSlot values ('PS.base.b3', 'PF0_1', '', 'WS.002.2a');
|
insert into PSlot values ('PS.base.b3', 'PF0_1', '', 'WS.002.2a');
|
||||||
QUERY: insert into PSlot values ('PS.base.b4', 'PF0_1', '', 'WS.002.2b');
|
insert into PSlot values ('PS.base.b4', 'PF0_1', '', 'WS.002.2b');
|
||||||
QUERY: insert into PSlot values ('PS.base.b5', 'PF0_1', '', 'WS.002.3a');
|
insert into PSlot values ('PS.base.b5', 'PF0_1', '', 'WS.002.3a');
|
||||||
QUERY: insert into PSlot values ('PS.base.b6', 'PF0_1', '', 'WS.002.3b');
|
insert into PSlot values ('PS.base.b6', 'PF0_1', '', 'WS.002.3b');
|
||||||
QUERY: insert into PSlot values ('PS.base.c1', 'PF0_1', '', 'WS.003.1a');
|
insert into PSlot values ('PS.base.c1', 'PF0_1', '', 'WS.003.1a');
|
||||||
QUERY: insert into PSlot values ('PS.base.c2', 'PF0_1', '', 'WS.003.1b');
|
insert into PSlot values ('PS.base.c2', 'PF0_1', '', 'WS.003.1b');
|
||||||
QUERY: insert into PSlot values ('PS.base.c3', 'PF0_1', '', 'WS.003.2a');
|
insert into PSlot values ('PS.base.c3', 'PF0_1', '', 'WS.003.2a');
|
||||||
QUERY: insert into PSlot values ('PS.base.c4', 'PF0_1', '', 'WS.003.2b');
|
insert into PSlot values ('PS.base.c4', 'PF0_1', '', 'WS.003.2b');
|
||||||
QUERY: insert into PSlot values ('PS.base.c5', 'PF0_1', '', 'WS.003.3a');
|
insert into PSlot values ('PS.base.c5', 'PF0_1', '', 'WS.003.3a');
|
||||||
QUERY: insert into PSlot values ('PS.base.c6', 'PF0_1', '', 'WS.003.3b');
|
insert into PSlot values ('PS.base.c6', 'PF0_1', '', 'WS.003.3b');
|
||||||
QUERY: insert into PField values ('PF0_X', 'Phonelines basement');
|
insert into PField values ('PF0_X', 'Phonelines basement');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta1', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta1', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta2', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta2', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta3', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta3', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta4', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta4', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta5', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta5', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.ta6', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.ta6', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb1', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb1', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb2', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb2', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb3', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb3', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb4', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb4', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb5', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb5', 'PF0_X', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.base.tb6', 'PF0_X', '', '');
|
insert into PSlot values ('PS.base.tb6', 'PF0_X', '', '');
|
||||||
QUERY: insert into PField values ('PF1_1', 'Wallslots 1st floor');
|
insert into PField values ('PF1_1', 'Wallslots 1st floor');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a1', 'PF1_1', '', 'WS.101.1a');
|
insert into PSlot values ('PS.1st.a1', 'PF1_1', '', 'WS.101.1a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a2', 'PF1_1', '', 'WS.101.1b');
|
insert into PSlot values ('PS.1st.a2', 'PF1_1', '', 'WS.101.1b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a3', 'PF1_1', '', 'WS.101.2a');
|
insert into PSlot values ('PS.1st.a3', 'PF1_1', '', 'WS.101.2a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a4', 'PF1_1', '', 'WS.101.2b');
|
insert into PSlot values ('PS.1st.a4', 'PF1_1', '', 'WS.101.2b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a5', 'PF1_1', '', 'WS.101.3a');
|
insert into PSlot values ('PS.1st.a5', 'PF1_1', '', 'WS.101.3a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.a6', 'PF1_1', '', 'WS.101.3b');
|
insert into PSlot values ('PS.1st.a6', 'PF1_1', '', 'WS.101.3b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b1', 'PF1_1', '', 'WS.102.1a');
|
insert into PSlot values ('PS.1st.b1', 'PF1_1', '', 'WS.102.1a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b2', 'PF1_1', '', 'WS.102.1b');
|
insert into PSlot values ('PS.1st.b2', 'PF1_1', '', 'WS.102.1b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b3', 'PF1_1', '', 'WS.102.2a');
|
insert into PSlot values ('PS.1st.b3', 'PF1_1', '', 'WS.102.2a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b4', 'PF1_1', '', 'WS.102.2b');
|
insert into PSlot values ('PS.1st.b4', 'PF1_1', '', 'WS.102.2b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b5', 'PF1_1', '', 'WS.102.3a');
|
insert into PSlot values ('PS.1st.b5', 'PF1_1', '', 'WS.102.3a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.b6', 'PF1_1', '', 'WS.102.3b');
|
insert into PSlot values ('PS.1st.b6', 'PF1_1', '', 'WS.102.3b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c1', 'PF1_1', '', 'WS.105.1a');
|
insert into PSlot values ('PS.1st.c1', 'PF1_1', '', 'WS.105.1a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c2', 'PF1_1', '', 'WS.105.1b');
|
insert into PSlot values ('PS.1st.c2', 'PF1_1', '', 'WS.105.1b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c3', 'PF1_1', '', 'WS.105.2a');
|
insert into PSlot values ('PS.1st.c3', 'PF1_1', '', 'WS.105.2a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c4', 'PF1_1', '', 'WS.105.2b');
|
insert into PSlot values ('PS.1st.c4', 'PF1_1', '', 'WS.105.2b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c5', 'PF1_1', '', 'WS.105.3a');
|
insert into PSlot values ('PS.1st.c5', 'PF1_1', '', 'WS.105.3a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.c6', 'PF1_1', '', 'WS.105.3b');
|
insert into PSlot values ('PS.1st.c6', 'PF1_1', '', 'WS.105.3b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d1', 'PF1_1', '', 'WS.106.1a');
|
insert into PSlot values ('PS.1st.d1', 'PF1_1', '', 'WS.106.1a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d2', 'PF1_1', '', 'WS.106.1b');
|
insert into PSlot values ('PS.1st.d2', 'PF1_1', '', 'WS.106.1b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d3', 'PF1_1', '', 'WS.106.2a');
|
insert into PSlot values ('PS.1st.d3', 'PF1_1', '', 'WS.106.2a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d4', 'PF1_1', '', 'WS.106.2b');
|
insert into PSlot values ('PS.1st.d4', 'PF1_1', '', 'WS.106.2b');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d5', 'PF1_1', '', 'WS.106.3a');
|
insert into PSlot values ('PS.1st.d5', 'PF1_1', '', 'WS.106.3a');
|
||||||
QUERY: insert into PSlot values ('PS.1st.d6', 'PF1_1', '', 'WS.106.3b');
|
insert into PSlot values ('PS.1st.d6', 'PF1_1', '', 'WS.106.3b');
|
||||||
QUERY: update PSlot set backlink = 'WS.001.1a' where slotname = 'PS.base.a1';
|
update PSlot set backlink = 'WS.001.1a' where slotname = 'PS.base.a1';
|
||||||
QUERY: update PSlot set backlink = 'WS.001.1b' where slotname = 'PS.base.a3';
|
update PSlot set backlink = 'WS.001.1b' where slotname = 'PS.base.a3';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a3
|
WS.001.1b | 001 | | PS.base.a3
|
||||||
WS.001.2a |001 | |
|
WS.001.2a | 001 | |
|
||||||
WS.001.2b |001 | |
|
WS.001.2b | 001 | |
|
||||||
WS.001.3a |001 | |
|
WS.001.3a | 001 | |
|
||||||
WS.001.3b |001 | |
|
WS.001.3b | 001 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |
|
PS.base.a2 | PF0_1 | |
|
||||||
PS.base.a3 |PF0_1 | |WS.001.1b
|
PS.base.a3 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a4 |PF0_1 | |
|
PS.base.a4 | PF0_1 | |
|
||||||
PS.base.a5 |PF0_1 | |
|
PS.base.a5 | PF0_1 | |
|
||||||
PS.base.a6 |PF0_1 | |
|
PS.base.a6 | PF0_1 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: update PSlot set backlink = 'WS.001.2a' where slotname = 'PS.base.a3';
|
update PSlot set backlink = 'WS.001.2a' where slotname = 'PS.base.a3';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |
|
WS.001.1b | 001 | |
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |
|
WS.001.2b | 001 | |
|
||||||
WS.001.3a |001 | |
|
WS.001.3a | 001 | |
|
||||||
WS.001.3b |001 | |
|
WS.001.3b | 001 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |
|
PS.base.a2 | PF0_1 | |
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |
|
PS.base.a4 | PF0_1 | |
|
||||||
PS.base.a5 |PF0_1 | |
|
PS.base.a5 | PF0_1 | |
|
||||||
PS.base.a6 |PF0_1 | |
|
PS.base.a6 | PF0_1 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: update PSlot set backlink = 'WS.001.1b' where slotname = 'PS.base.a2';
|
update PSlot set backlink = 'WS.001.1b' where slotname = 'PS.base.a2';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a2
|
WS.001.1b | 001 | | PS.base.a2
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |
|
WS.001.2b | 001 | |
|
||||||
WS.001.3a |001 | |
|
WS.001.3a | 001 | |
|
||||||
WS.001.3b |001 | |
|
WS.001.3b | 001 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |WS.001.1b
|
PS.base.a2 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |
|
PS.base.a4 | PF0_1 | |
|
||||||
PS.base.a5 |PF0_1 | |
|
PS.base.a5 | PF0_1 | |
|
||||||
PS.base.a6 |PF0_1 | |
|
PS.base.a6 | PF0_1 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: update WSlot set backlink = 'PS.base.a4' where slotname = 'WS.001.2b';
|
update WSlot set backlink = 'PS.base.a4' where slotname = 'WS.001.2b';
|
||||||
QUERY: update WSlot set backlink = 'PS.base.a6' where slotname = 'WS.001.3a';
|
update WSlot set backlink = 'PS.base.a6' where slotname = 'WS.001.3a';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a2
|
WS.001.1b | 001 | | PS.base.a2
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |PS.base.a4
|
WS.001.2b | 001 | | PS.base.a4
|
||||||
WS.001.3a |001 | |PS.base.a6
|
WS.001.3a | 001 | | PS.base.a6
|
||||||
WS.001.3b |001 | |
|
WS.001.3b | 001 | |
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |WS.001.1b
|
PS.base.a2 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |WS.001.2b
|
PS.base.a4 | PF0_1 | | WS.001.2b
|
||||||
PS.base.a5 |PF0_1 | |
|
PS.base.a5 | PF0_1 | |
|
||||||
PS.base.a6 |PF0_1 | |WS.001.3a
|
PS.base.a6 | PF0_1 | | WS.001.3a
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: update WSlot set backlink = 'PS.base.a6' where slotname = 'WS.001.3b';
|
update WSlot set backlink = 'PS.base.a6' where slotname = 'WS.001.3b';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a2
|
WS.001.1b | 001 | | PS.base.a2
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |PS.base.a4
|
WS.001.2b | 001 | | PS.base.a4
|
||||||
WS.001.3a |001 | |
|
WS.001.3a | 001 | |
|
||||||
WS.001.3b |001 | |PS.base.a6
|
WS.001.3b | 001 | | PS.base.a6
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |WS.001.1b
|
PS.base.a2 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |WS.001.2b
|
PS.base.a4 | PF0_1 | | WS.001.2b
|
||||||
PS.base.a5 |PF0_1 | |
|
PS.base.a5 | PF0_1 | |
|
||||||
PS.base.a6 |PF0_1 | |WS.001.3b
|
PS.base.a6 | PF0_1 | | WS.001.3b
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: update WSlot set backlink = 'PS.base.a5' where slotname = 'WS.001.3a';
|
update WSlot set backlink = 'PS.base.a5' where slotname = 'WS.001.3a';
|
||||||
QUERY: select * from WSlot where roomno = '001' order by slotname;
|
select * from WSlot where roomno = '001' order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a2
|
WS.001.1b | 001 | | PS.base.a2
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |PS.base.a4
|
WS.001.2b | 001 | | PS.base.a4
|
||||||
WS.001.3a |001 | |PS.base.a5
|
WS.001.3a | 001 | | PS.base.a5
|
||||||
WS.001.3b |001 | |PS.base.a6
|
WS.001.3b | 001 | | PS.base.a6
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
select * from PSlot where slotname ~ 'PS.base.a' order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |WS.001.1b
|
PS.base.a2 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |WS.001.2b
|
PS.base.a4 | PF0_1 | | WS.001.2b
|
||||||
PS.base.a5 |PF0_1 | |WS.001.3a
|
PS.base.a5 | PF0_1 | | WS.001.3a
|
||||||
PS.base.a6 |PF0_1 | |WS.001.3b
|
PS.base.a6 | PF0_1 | | WS.001.3b
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
QUERY: insert into PField values ('PF1_2', 'Phonelines 1st floor');
|
insert into PField values ('PF1_2', 'Phonelines 1st floor');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta1', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta1', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta2', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta2', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta3', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta3', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta4', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta4', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta5', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta5', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.ta6', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.ta6', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb1', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb1', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb2', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb2', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb3', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb3', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb4', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb4', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb5', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb5', 'PF1_2', '', '');
|
||||||
QUERY: insert into PSlot values ('PS.1st.tb6', 'PF1_2', '', '');
|
insert into PSlot values ('PS.1st.tb6', 'PF1_2', '', '');
|
||||||
QUERY: update PField set name = 'PF0_2' where name = 'PF0_X';
|
update PField set name = 'PF0_2' where name = 'PF0_X';
|
||||||
QUERY: select * from PSlot order by slotname;
|
select * from PSlot order by slotname;
|
||||||
slotname |pfname| slotlink|backlink
|
slotname | pfname | slotlink | backlink
|
||||||
--------------------+------+--------------------+--------------------
|
----------------------+--------+----------------------+----------------------
|
||||||
PS.1st.a1 |PF1_1 | |WS.101.1a
|
PS.1st.a1 | PF1_1 | | WS.101.1a
|
||||||
PS.1st.a2 |PF1_1 | |WS.101.1b
|
PS.1st.a2 | PF1_1 | | WS.101.1b
|
||||||
PS.1st.a3 |PF1_1 | |WS.101.2a
|
PS.1st.a3 | PF1_1 | | WS.101.2a
|
||||||
PS.1st.a4 |PF1_1 | |WS.101.2b
|
PS.1st.a4 | PF1_1 | | WS.101.2b
|
||||||
PS.1st.a5 |PF1_1 | |WS.101.3a
|
PS.1st.a5 | PF1_1 | | WS.101.3a
|
||||||
PS.1st.a6 |PF1_1 | |WS.101.3b
|
PS.1st.a6 | PF1_1 | | WS.101.3b
|
||||||
PS.1st.b1 |PF1_1 | |WS.102.1a
|
PS.1st.b1 | PF1_1 | | WS.102.1a
|
||||||
PS.1st.b2 |PF1_1 | |WS.102.1b
|
PS.1st.b2 | PF1_1 | | WS.102.1b
|
||||||
PS.1st.b3 |PF1_1 | |WS.102.2a
|
PS.1st.b3 | PF1_1 | | WS.102.2a
|
||||||
PS.1st.b4 |PF1_1 | |WS.102.2b
|
PS.1st.b4 | PF1_1 | | WS.102.2b
|
||||||
PS.1st.b5 |PF1_1 | |WS.102.3a
|
PS.1st.b5 | PF1_1 | | WS.102.3a
|
||||||
PS.1st.b6 |PF1_1 | |WS.102.3b
|
PS.1st.b6 | PF1_1 | | WS.102.3b
|
||||||
PS.1st.c1 |PF1_1 | |WS.105.1a
|
PS.1st.c1 | PF1_1 | | WS.105.1a
|
||||||
PS.1st.c2 |PF1_1 | |WS.105.1b
|
PS.1st.c2 | PF1_1 | | WS.105.1b
|
||||||
PS.1st.c3 |PF1_1 | |WS.105.2a
|
PS.1st.c3 | PF1_1 | | WS.105.2a
|
||||||
PS.1st.c4 |PF1_1 | |WS.105.2b
|
PS.1st.c4 | PF1_1 | | WS.105.2b
|
||||||
PS.1st.c5 |PF1_1 | |WS.105.3a
|
PS.1st.c5 | PF1_1 | | WS.105.3a
|
||||||
PS.1st.c6 |PF1_1 | |WS.105.3b
|
PS.1st.c6 | PF1_1 | | WS.105.3b
|
||||||
PS.1st.d1 |PF1_1 | |WS.106.1a
|
PS.1st.d1 | PF1_1 | | WS.106.1a
|
||||||
PS.1st.d2 |PF1_1 | |WS.106.1b
|
PS.1st.d2 | PF1_1 | | WS.106.1b
|
||||||
PS.1st.d3 |PF1_1 | |WS.106.2a
|
PS.1st.d3 | PF1_1 | | WS.106.2a
|
||||||
PS.1st.d4 |PF1_1 | |WS.106.2b
|
PS.1st.d4 | PF1_1 | | WS.106.2b
|
||||||
PS.1st.d5 |PF1_1 | |WS.106.3a
|
PS.1st.d5 | PF1_1 | | WS.106.3a
|
||||||
PS.1st.d6 |PF1_1 | |WS.106.3b
|
PS.1st.d6 | PF1_1 | | WS.106.3b
|
||||||
PS.1st.ta1 |PF1_2 | |
|
PS.1st.ta1 | PF1_2 | |
|
||||||
PS.1st.ta2 |PF1_2 | |
|
PS.1st.ta2 | PF1_2 | |
|
||||||
PS.1st.ta3 |PF1_2 | |
|
PS.1st.ta3 | PF1_2 | |
|
||||||
PS.1st.ta4 |PF1_2 | |
|
PS.1st.ta4 | PF1_2 | |
|
||||||
PS.1st.ta5 |PF1_2 | |
|
PS.1st.ta5 | PF1_2 | |
|
||||||
PS.1st.ta6 |PF1_2 | |
|
PS.1st.ta6 | PF1_2 | |
|
||||||
PS.1st.tb1 |PF1_2 | |
|
PS.1st.tb1 | PF1_2 | |
|
||||||
PS.1st.tb2 |PF1_2 | |
|
PS.1st.tb2 | PF1_2 | |
|
||||||
PS.1st.tb3 |PF1_2 | |
|
PS.1st.tb3 | PF1_2 | |
|
||||||
PS.1st.tb4 |PF1_2 | |
|
PS.1st.tb4 | PF1_2 | |
|
||||||
PS.1st.tb5 |PF1_2 | |
|
PS.1st.tb5 | PF1_2 | |
|
||||||
PS.1st.tb6 |PF1_2 | |
|
PS.1st.tb6 | PF1_2 | |
|
||||||
PS.base.a1 |PF0_1 | |WS.001.1a
|
PS.base.a1 | PF0_1 | | WS.001.1a
|
||||||
PS.base.a2 |PF0_1 | |WS.001.1b
|
PS.base.a2 | PF0_1 | | WS.001.1b
|
||||||
PS.base.a3 |PF0_1 | |WS.001.2a
|
PS.base.a3 | PF0_1 | | WS.001.2a
|
||||||
PS.base.a4 |PF0_1 | |WS.001.2b
|
PS.base.a4 | PF0_1 | | WS.001.2b
|
||||||
PS.base.a5 |PF0_1 | |WS.001.3a
|
PS.base.a5 | PF0_1 | | WS.001.3a
|
||||||
PS.base.a6 |PF0_1 | |WS.001.3b
|
PS.base.a6 | PF0_1 | | WS.001.3b
|
||||||
PS.base.b1 |PF0_1 | |WS.002.1a
|
PS.base.b1 | PF0_1 | | WS.002.1a
|
||||||
PS.base.b2 |PF0_1 | |WS.002.1b
|
PS.base.b2 | PF0_1 | | WS.002.1b
|
||||||
PS.base.b3 |PF0_1 | |WS.002.2a
|
PS.base.b3 | PF0_1 | | WS.002.2a
|
||||||
PS.base.b4 |PF0_1 | |WS.002.2b
|
PS.base.b4 | PF0_1 | | WS.002.2b
|
||||||
PS.base.b5 |PF0_1 | |WS.002.3a
|
PS.base.b5 | PF0_1 | | WS.002.3a
|
||||||
PS.base.b6 |PF0_1 | |WS.002.3b
|
PS.base.b6 | PF0_1 | | WS.002.3b
|
||||||
PS.base.c1 |PF0_1 | |WS.003.1a
|
PS.base.c1 | PF0_1 | | WS.003.1a
|
||||||
PS.base.c2 |PF0_1 | |WS.003.1b
|
PS.base.c2 | PF0_1 | | WS.003.1b
|
||||||
PS.base.c3 |PF0_1 | |WS.003.2a
|
PS.base.c3 | PF0_1 | | WS.003.2a
|
||||||
PS.base.c4 |PF0_1 | |WS.003.2b
|
PS.base.c4 | PF0_1 | | WS.003.2b
|
||||||
PS.base.c5 |PF0_1 | |WS.003.3a
|
PS.base.c5 | PF0_1 | | WS.003.3a
|
||||||
PS.base.c6 |PF0_1 | |WS.003.3b
|
PS.base.c6 | PF0_1 | | WS.003.3b
|
||||||
PS.base.ta1 |PF0_2 | |
|
PS.base.ta1 | PF0_2 | |
|
||||||
PS.base.ta2 |PF0_2 | |
|
PS.base.ta2 | PF0_2 | |
|
||||||
PS.base.ta3 |PF0_2 | |
|
PS.base.ta3 | PF0_2 | |
|
||||||
PS.base.ta4 |PF0_2 | |
|
PS.base.ta4 | PF0_2 | |
|
||||||
PS.base.ta5 |PF0_2 | |
|
PS.base.ta5 | PF0_2 | |
|
||||||
PS.base.ta6 |PF0_2 | |
|
PS.base.ta6 | PF0_2 | |
|
||||||
PS.base.tb1 |PF0_2 | |
|
PS.base.tb1 | PF0_2 | |
|
||||||
PS.base.tb2 |PF0_2 | |
|
PS.base.tb2 | PF0_2 | |
|
||||||
PS.base.tb3 |PF0_2 | |
|
PS.base.tb3 | PF0_2 | |
|
||||||
PS.base.tb4 |PF0_2 | |
|
PS.base.tb4 | PF0_2 | |
|
||||||
PS.base.tb5 |PF0_2 | |
|
PS.base.tb5 | PF0_2 | |
|
||||||
PS.base.tb6 |PF0_2 | |
|
PS.base.tb6 | PF0_2 | |
|
||||||
(66 rows)
|
(66 rows)
|
||||||
|
|
||||||
QUERY: select * from WSlot order by slotname;
|
select * from WSlot order by slotname;
|
||||||
slotname | roomno| slotlink|backlink
|
slotname | roomno | slotlink | backlink
|
||||||
--------------------+--------+--------------------+--------------------
|
----------------------+----------+----------------------+----------------------
|
||||||
WS.001.1a |001 | |PS.base.a1
|
WS.001.1a | 001 | | PS.base.a1
|
||||||
WS.001.1b |001 | |PS.base.a2
|
WS.001.1b | 001 | | PS.base.a2
|
||||||
WS.001.2a |001 | |PS.base.a3
|
WS.001.2a | 001 | | PS.base.a3
|
||||||
WS.001.2b |001 | |PS.base.a4
|
WS.001.2b | 001 | | PS.base.a4
|
||||||
WS.001.3a |001 | |PS.base.a5
|
WS.001.3a | 001 | | PS.base.a5
|
||||||
WS.001.3b |001 | |PS.base.a6
|
WS.001.3b | 001 | | PS.base.a6
|
||||||
WS.002.1a |002 | |PS.base.b1
|
WS.002.1a | 002 | | PS.base.b1
|
||||||
WS.002.1b |002 | |PS.base.b2
|
WS.002.1b | 002 | | PS.base.b2
|
||||||
WS.002.2a |002 | |PS.base.b3
|
WS.002.2a | 002 | | PS.base.b3
|
||||||
WS.002.2b |002 | |PS.base.b4
|
WS.002.2b | 002 | | PS.base.b4
|
||||||
WS.002.3a |002 | |PS.base.b5
|
WS.002.3a | 002 | | PS.base.b5
|
||||||
WS.002.3b |002 | |PS.base.b6
|
WS.002.3b | 002 | | PS.base.b6
|
||||||
WS.003.1a |003 | |PS.base.c1
|
WS.003.1a | 003 | | PS.base.c1
|
||||||
WS.003.1b |003 | |PS.base.c2
|
WS.003.1b | 003 | | PS.base.c2
|
||||||
WS.003.2a |003 | |PS.base.c3
|
WS.003.2a | 003 | | PS.base.c3
|
||||||
WS.003.2b |003 | |PS.base.c4
|
WS.003.2b | 003 | | PS.base.c4
|
||||||
WS.003.3a |003 | |PS.base.c5
|
WS.003.3a | 003 | | PS.base.c5
|
||||||
WS.003.3b |003 | |PS.base.c6
|
WS.003.3b | 003 | | PS.base.c6
|
||||||
WS.101.1a |101 | |PS.1st.a1
|
WS.101.1a | 101 | | PS.1st.a1
|
||||||
WS.101.1b |101 | |PS.1st.a2
|
WS.101.1b | 101 | | PS.1st.a2
|
||||||
WS.101.2a |101 | |PS.1st.a3
|
WS.101.2a | 101 | | PS.1st.a3
|
||||||
WS.101.2b |101 | |PS.1st.a4
|
WS.101.2b | 101 | | PS.1st.a4
|
||||||
WS.101.3a |101 | |PS.1st.a5
|
WS.101.3a | 101 | | PS.1st.a5
|
||||||
WS.101.3b |101 | |PS.1st.a6
|
WS.101.3b | 101 | | PS.1st.a6
|
||||||
WS.102.1a |102 | |PS.1st.b1
|
WS.102.1a | 102 | | PS.1st.b1
|
||||||
WS.102.1b |102 | |PS.1st.b2
|
WS.102.1b | 102 | | PS.1st.b2
|
||||||
WS.102.2a |102 | |PS.1st.b3
|
WS.102.2a | 102 | | PS.1st.b3
|
||||||
WS.102.2b |102 | |PS.1st.b4
|
WS.102.2b | 102 | | PS.1st.b4
|
||||||
WS.102.3a |102 | |PS.1st.b5
|
WS.102.3a | 102 | | PS.1st.b5
|
||||||
WS.102.3b |102 | |PS.1st.b6
|
WS.102.3b | 102 | | PS.1st.b6
|
||||||
WS.105.1a |105 | |PS.1st.c1
|
WS.105.1a | 105 | | PS.1st.c1
|
||||||
WS.105.1b |105 | |PS.1st.c2
|
WS.105.1b | 105 | | PS.1st.c2
|
||||||
WS.105.2a |105 | |PS.1st.c3
|
WS.105.2a | 105 | | PS.1st.c3
|
||||||
WS.105.2b |105 | |PS.1st.c4
|
WS.105.2b | 105 | | PS.1st.c4
|
||||||
WS.105.3a |105 | |PS.1st.c5
|
WS.105.3a | 105 | | PS.1st.c5
|
||||||
WS.105.3b |105 | |PS.1st.c6
|
WS.105.3b | 105 | | PS.1st.c6
|
||||||
WS.106.1a |106 | |PS.1st.d1
|
WS.106.1a | 106 | | PS.1st.d1
|
||||||
WS.106.1b |106 | |PS.1st.d2
|
WS.106.1b | 106 | | PS.1st.d2
|
||||||
WS.106.2a |106 | |PS.1st.d3
|
WS.106.2a | 106 | | PS.1st.d3
|
||||||
WS.106.2b |106 | |PS.1st.d4
|
WS.106.2b | 106 | | PS.1st.d4
|
||||||
WS.106.3a |106 | |PS.1st.d5
|
WS.106.3a | 106 | | PS.1st.d5
|
||||||
WS.106.3b |106 | |PS.1st.d6
|
WS.106.3b | 106 | | PS.1st.d6
|
||||||
(42 rows)
|
(42 rows)
|
||||||
|
|
||||||
QUERY: insert into PLine values ('PL.001', '-0', 'Central call', 'PS.base.ta1');
|
insert into PLine values ('PL.001', '-0', 'Central call', 'PS.base.ta1');
|
||||||
QUERY: insert into PLine values ('PL.002', '-101', '', 'PS.base.ta2');
|
insert into PLine values ('PL.002', '-101', '', 'PS.base.ta2');
|
||||||
QUERY: insert into PLine values ('PL.003', '-102', '', 'PS.base.ta3');
|
insert into PLine values ('PL.003', '-102', '', 'PS.base.ta3');
|
||||||
QUERY: insert into PLine values ('PL.004', '-103', '', 'PS.base.ta5');
|
insert into PLine values ('PL.004', '-103', '', 'PS.base.ta5');
|
||||||
QUERY: insert into PLine values ('PL.005', '-104', '', 'PS.base.ta6');
|
insert into PLine values ('PL.005', '-104', '', 'PS.base.ta6');
|
||||||
QUERY: insert into PLine values ('PL.006', '-106', '', 'PS.base.tb2');
|
insert into PLine values ('PL.006', '-106', '', 'PS.base.tb2');
|
||||||
QUERY: insert into PLine values ('PL.007', '-108', '', 'PS.base.tb3');
|
insert into PLine values ('PL.007', '-108', '', 'PS.base.tb3');
|
||||||
QUERY: insert into PLine values ('PL.008', '-109', '', 'PS.base.tb4');
|
insert into PLine values ('PL.008', '-109', '', 'PS.base.tb4');
|
||||||
QUERY: insert into PLine values ('PL.009', '-121', '', 'PS.base.tb5');
|
insert into PLine values ('PL.009', '-121', '', 'PS.base.tb5');
|
||||||
QUERY: insert into PLine values ('PL.010', '-122', '', 'PS.base.tb6');
|
insert into PLine values ('PL.010', '-122', '', 'PS.base.tb6');
|
||||||
QUERY: insert into PLine values ('PL.015', '-134', '', 'PS.1st.ta1');
|
insert into PLine values ('PL.015', '-134', '', 'PS.1st.ta1');
|
||||||
QUERY: insert into PLine values ('PL.016', '-137', '', 'PS.1st.ta3');
|
insert into PLine values ('PL.016', '-137', '', 'PS.1st.ta3');
|
||||||
QUERY: insert into PLine values ('PL.017', '-139', '', 'PS.1st.ta4');
|
insert into PLine values ('PL.017', '-139', '', 'PS.1st.ta4');
|
||||||
QUERY: insert into PLine values ('PL.018', '-362', '', 'PS.1st.tb1');
|
insert into PLine values ('PL.018', '-362', '', 'PS.1st.tb1');
|
||||||
QUERY: insert into PLine values ('PL.019', '-363', '', 'PS.1st.tb2');
|
insert into PLine values ('PL.019', '-363', '', 'PS.1st.tb2');
|
||||||
QUERY: insert into PLine values ('PL.020', '-364', '', 'PS.1st.tb3');
|
insert into PLine values ('PL.020', '-364', '', 'PS.1st.tb3');
|
||||||
QUERY: insert into PLine values ('PL.021', '-365', '', 'PS.1st.tb5');
|
insert into PLine values ('PL.021', '-365', '', 'PS.1st.tb5');
|
||||||
QUERY: insert into PLine values ('PL.022', '-367', '', 'PS.1st.tb6');
|
insert into PLine values ('PL.022', '-367', '', 'PS.1st.tb6');
|
||||||
QUERY: insert into PLine values ('PL.028', '-501', 'Fax entrance', 'PS.base.ta2');
|
insert into PLine values ('PL.028', '-501', 'Fax entrance', 'PS.base.ta2');
|
||||||
QUERY: insert into PLine values ('PL.029', '-502', 'Fax 1st floor', 'PS.1st.ta1');
|
insert into PLine values ('PL.029', '-502', 'Fax 1st floor', 'PS.1st.ta1');
|
||||||
QUERY: insert into PHone values ('PH.hc001', 'Hicom standard', 'WS.001.1a');
|
insert into PHone values ('PH.hc001', 'Hicom standard', 'WS.001.1a');
|
||||||
QUERY: update PSlot set slotlink = 'PS.base.ta1' where slotname = 'PS.base.a1';
|
update PSlot set slotlink = 'PS.base.ta1' where slotname = 'PS.base.a1';
|
||||||
QUERY: insert into PHone values ('PH.hc002', 'Hicom standard', 'WS.002.1a');
|
insert into PHone values ('PH.hc002', 'Hicom standard', 'WS.002.1a');
|
||||||
QUERY: update PSlot set slotlink = 'PS.base.ta5' where slotname = 'PS.base.b1';
|
update PSlot set slotlink = 'PS.base.ta5' where slotname = 'PS.base.b1';
|
||||||
QUERY: insert into PHone values ('PH.hc003', 'Hicom standard', 'WS.002.2a');
|
insert into PHone values ('PH.hc003', 'Hicom standard', 'WS.002.2a');
|
||||||
QUERY: update PSlot set slotlink = 'PS.base.tb2' where slotname = 'PS.base.b3';
|
update PSlot set slotlink = 'PS.base.tb2' where slotname = 'PS.base.b3';
|
||||||
QUERY: insert into PHone values ('PH.fax001', 'Canon fax', 'WS.001.2a');
|
insert into PHone values ('PH.fax001', 'Canon fax', 'WS.001.2a');
|
||||||
QUERY: update PSlot set slotlink = 'PS.base.ta2' where slotname = 'PS.base.a3';
|
update PSlot set slotlink = 'PS.base.ta2' where slotname = 'PS.base.a3';
|
||||||
QUERY: insert into Hub values ('base.hub1', 'Patchfield PF0_1 hub', 16);
|
insert into Hub values ('base.hub1', 'Patchfield PF0_1 hub', 16);
|
||||||
QUERY: insert into System values ('orion', 'PC');
|
insert into System values ('orion', 'PC');
|
||||||
QUERY: insert into IFace values ('IF', 'orion', 'eth0', 'WS.002.1b');
|
insert into IFace values ('IF', 'orion', 'eth0', 'WS.002.1b');
|
||||||
QUERY: update PSlot set slotlink = 'HS.base.hub1.1' where slotname = 'PS.base.b2';
|
update PSlot set slotlink = 'HS.base.hub1.1' where slotname = 'PS.base.b2';
|
||||||
QUERY: select * from PField_v1 where pfname = 'PF0_1' order by slotname;
|
select * from PField_v1 where pfname = 'PF0_1' order by slotname;
|
||||||
pfname|slotname |backside |patch
|
pfname | slotname | backside | patch
|
||||||
------+--------------------+--------------------------------------------------------+---------------------------------------------
|
--------+----------------------+----------------------------------------------------------+-----------------------------------------------
|
||||||
PF0_1 |PS.base.a1 |WS.001.1a in room 001 -> Phone PH.hc001 (Hicom standard)|PS.base.ta1 -> Phone line -0 (Central call)
|
PF0_1 | PS.base.a1 | WS.001.1a in room 001 -> Phone PH.hc001 (Hicom standard) | PS.base.ta1 -> Phone line -0 (Central call)
|
||||||
PF0_1 |PS.base.a2 |WS.001.1b in room 001 -> - |-
|
PF0_1 | PS.base.a2 | WS.001.1b in room 001 -> - | -
|
||||||
PF0_1 |PS.base.a3 |WS.001.2a in room 001 -> Phone PH.fax001 (Canon fax) |PS.base.ta2 -> Phone line -501 (Fax entrance)
|
PF0_1 | PS.base.a3 | WS.001.2a in room 001 -> Phone PH.fax001 (Canon fax) | PS.base.ta2 -> Phone line -501 (Fax entrance)
|
||||||
PF0_1 |PS.base.a4 |WS.001.2b in room 001 -> - |-
|
PF0_1 | PS.base.a4 | WS.001.2b in room 001 -> - | -
|
||||||
PF0_1 |PS.base.a5 |WS.001.3a in room 001 -> - |-
|
PF0_1 | PS.base.a5 | WS.001.3a in room 001 -> - | -
|
||||||
PF0_1 |PS.base.a6 |WS.001.3b in room 001 -> - |-
|
PF0_1 | PS.base.a6 | WS.001.3b in room 001 -> - | -
|
||||||
PF0_1 |PS.base.b1 |WS.002.1a in room 002 -> Phone PH.hc002 (Hicom standard)|PS.base.ta5 -> Phone line -103
|
PF0_1 | PS.base.b1 | WS.002.1a in room 002 -> Phone PH.hc002 (Hicom standard) | PS.base.ta5 -> Phone line -103
|
||||||
PF0_1 |PS.base.b2 |WS.002.1b in room 002 -> orion IF eth0 (PC) |Patchfield PF0_1 hub slot 1
|
PF0_1 | PS.base.b2 | WS.002.1b in room 002 -> orion IF eth0 (PC) | Patchfield PF0_1 hub slot 1
|
||||||
PF0_1 |PS.base.b3 |WS.002.2a in room 002 -> Phone PH.hc003 (Hicom standard)|PS.base.tb2 -> Phone line -106
|
PF0_1 | PS.base.b3 | WS.002.2a in room 002 -> Phone PH.hc003 (Hicom standard) | PS.base.tb2 -> Phone line -106
|
||||||
PF0_1 |PS.base.b4 |WS.002.2b in room 002 -> - |-
|
PF0_1 | PS.base.b4 | WS.002.2b in room 002 -> - | -
|
||||||
PF0_1 |PS.base.b5 |WS.002.3a in room 002 -> - |-
|
PF0_1 | PS.base.b5 | WS.002.3a in room 002 -> - | -
|
||||||
PF0_1 |PS.base.b6 |WS.002.3b in room 002 -> - |-
|
PF0_1 | PS.base.b6 | WS.002.3b in room 002 -> - | -
|
||||||
PF0_1 |PS.base.c1 |WS.003.1a in room 003 -> - |-
|
PF0_1 | PS.base.c1 | WS.003.1a in room 003 -> - | -
|
||||||
PF0_1 |PS.base.c2 |WS.003.1b in room 003 -> - |-
|
PF0_1 | PS.base.c2 | WS.003.1b in room 003 -> - | -
|
||||||
PF0_1 |PS.base.c3 |WS.003.2a in room 003 -> - |-
|
PF0_1 | PS.base.c3 | WS.003.2a in room 003 -> - | -
|
||||||
PF0_1 |PS.base.c4 |WS.003.2b in room 003 -> - |-
|
PF0_1 | PS.base.c4 | WS.003.2b in room 003 -> - | -
|
||||||
PF0_1 |PS.base.c5 |WS.003.3a in room 003 -> - |-
|
PF0_1 | PS.base.c5 | WS.003.3a in room 003 -> - | -
|
||||||
PF0_1 |PS.base.c6 |WS.003.3b in room 003 -> - |-
|
PF0_1 | PS.base.c6 | WS.003.3b in room 003 -> - | -
|
||||||
(18 rows)
|
(18 rows)
|
||||||
|
|
||||||
QUERY: select * from PField_v1 where pfname = 'PF0_2' order by slotname;
|
select * from PField_v1 where pfname = 'PF0_2' order by slotname;
|
||||||
pfname|slotname |backside |patch
|
pfname | slotname | backside | patch
|
||||||
------+--------------------+------------------------------+----------------------------------------------------------------------
|
--------+----------------------+--------------------------------+------------------------------------------------------------------------
|
||||||
PF0_2 |PS.base.ta1 |Phone line -0 (Central call) |PS.base.a1 -> WS.001.1a in room 001 -> Phone PH.hc001 (Hicom standard)
|
PF0_2 | PS.base.ta1 | Phone line -0 (Central call) | PS.base.a1 -> WS.001.1a in room 001 -> Phone PH.hc001 (Hicom standard)
|
||||||
PF0_2 |PS.base.ta2 |Phone line -501 (Fax entrance)|PS.base.a3 -> WS.001.2a in room 001 -> Phone PH.fax001 (Canon fax)
|
PF0_2 | PS.base.ta2 | Phone line -501 (Fax entrance) | PS.base.a3 -> WS.001.2a in room 001 -> Phone PH.fax001 (Canon fax)
|
||||||
PF0_2 |PS.base.ta3 |Phone line -102 |-
|
PF0_2 | PS.base.ta3 | Phone line -102 | -
|
||||||
PF0_2 |PS.base.ta4 |- |-
|
PF0_2 | PS.base.ta4 | - | -
|
||||||
PF0_2 |PS.base.ta5 |Phone line -103 |PS.base.b1 -> WS.002.1a in room 002 -> Phone PH.hc002 (Hicom standard)
|
PF0_2 | PS.base.ta5 | Phone line -103 | PS.base.b1 -> WS.002.1a in room 002 -> Phone PH.hc002 (Hicom standard)
|
||||||
PF0_2 |PS.base.ta6 |Phone line -104 |-
|
PF0_2 | PS.base.ta6 | Phone line -104 | -
|
||||||
PF0_2 |PS.base.tb1 |- |-
|
PF0_2 | PS.base.tb1 | - | -
|
||||||
PF0_2 |PS.base.tb2 |Phone line -106 |PS.base.b3 -> WS.002.2a in room 002 -> Phone PH.hc003 (Hicom standard)
|
PF0_2 | PS.base.tb2 | Phone line -106 | PS.base.b3 -> WS.002.2a in room 002 -> Phone PH.hc003 (Hicom standard)
|
||||||
PF0_2 |PS.base.tb3 |Phone line -108 |-
|
PF0_2 | PS.base.tb3 | Phone line -108 | -
|
||||||
PF0_2 |PS.base.tb4 |Phone line -109 |-
|
PF0_2 | PS.base.tb4 | Phone line -109 | -
|
||||||
PF0_2 |PS.base.tb5 |Phone line -121 |-
|
PF0_2 | PS.base.tb5 | Phone line -121 | -
|
||||||
PF0_2 |PS.base.tb6 |Phone line -122 |-
|
PF0_2 | PS.base.tb6 | Phone line -122 | -
|
||||||
(12 rows)
|
(12 rows)
|
||||||
|
|
||||||
QUERY: insert into PField values ('PF1_1', 'should fail due to unique index');
|
insert into PField values ('PF1_1', 'should fail due to unique index');
|
||||||
ERROR: Cannot insert a duplicate key into a unique index
|
psql:test.sql:263: ERROR: Cannot insert a duplicate key into unique index pfield_name
|
||||||
QUERY: update PSlot set backlink = 'WS.not.there' where slotname = 'PS.base.a1';
|
update PSlot set backlink = 'WS.not.there' where slotname = 'PS.base.a1';
|
||||||
ERROR: WS.not.there does not exists
|
psql:test.sql:264: ERROR: WS.not.there does not exist
|
||||||
QUERY: update PSlot set backlink = 'XX.illegal' where slotname = 'PS.base.a1';
|
update PSlot set backlink = 'XX.illegal' where slotname = 'PS.base.a1';
|
||||||
ERROR: illegal backlink beginning with XX
|
psql:test.sql:265: ERROR: illegal backlink beginning with XX
|
||||||
QUERY: update PSlot set slotlink = 'PS.not.there' where slotname = 'PS.base.a1';
|
update PSlot set slotlink = 'PS.not.there' where slotname = 'PS.base.a1';
|
||||||
ERROR: PS.not.there does not exists
|
psql:test.sql:266: ERROR: PS.not.there does not exist
|
||||||
QUERY: update PSlot set slotlink = 'XX.illegal' where slotname = 'PS.base.a1';
|
update PSlot set slotlink = 'XX.illegal' where slotname = 'PS.base.a1';
|
||||||
ERROR: illegal slotlink beginning with XX
|
psql:test.sql:267: ERROR: illegal slotlink beginning with XX
|
||||||
QUERY: insert into HSlot values ('HS', 'base.hub1', 1, '');
|
insert into HSlot values ('HS', 'base.hub1', 1, '');
|
||||||
ERROR: Cannot insert a duplicate key into a unique index
|
psql:test.sql:268: ERROR: Cannot insert a duplicate key into unique index hslot_name
|
||||||
QUERY: insert into HSlot values ('HS', 'base.hub1', 20, '');
|
insert into HSlot values ('HS', 'base.hub1', 20, '');
|
||||||
ERROR: no manual manipulation of HSlot
|
psql:test.sql:269: ERROR: no manual manipulation of HSlot
|
||||||
QUERY: delete from HSlot;
|
delete from HSlot;
|
||||||
ERROR: no manual manipulation of HSlot
|
psql:test.sql:270: ERROR: no manual manipulation of HSlot
|
||||||
QUERY: insert into IFace values ('IF', 'notthere', 'eth0', '');
|
insert into IFace values ('IF', 'notthere', 'eth0', '');
|
||||||
ERROR: system "notthere" does not exist
|
psql:test.sql:271: ERROR: system "notthere" does not exist
|
||||||
QUERY: insert into IFace values ('IF', 'orion', 'ethernet_interface_name_too_long', '');
|
insert into IFace values ('IF', 'orion', 'ethernet_interface_name_too_long', '');
|
||||||
ERROR: IFace slotname "IF.orion.ethernet_interface_name_too_long" too long (20 char max)
|
psql:test.sql:272: ERROR: IFace slotname "IF.orion.ethernet_interface_name_too_long" too long (20 char max)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QUERY: create function tg_room_au() returns opaque as '
|
create function tg_room_au() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.roomno != old.roomno then
|
if new.roomno != old.roomno then
|
||||||
update WSlot set roomno = new.roomno where roomno = old.roomno;
|
update WSlot set roomno = new.roomno where roomno = old.roomno;
|
||||||
@ -6,17 +6,17 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_room_au after update
|
create trigger tg_room_au after update
|
||||||
on Room for each row execute procedure tg_room_au();
|
on Room for each row execute procedure tg_room_au();
|
||||||
QUERY: create function tg_room_ad() returns opaque as '
|
create function tg_room_ad() returns opaque as '
|
||||||
begin
|
begin
|
||||||
delete from WSlot where roomno = old.roomno;
|
delete from WSlot where roomno = old.roomno;
|
||||||
return old;
|
return old;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_room_ad after delete
|
create trigger tg_room_ad after delete
|
||||||
on Room for each row execute procedure tg_room_ad();
|
on Room for each row execute procedure tg_room_ad();
|
||||||
QUERY: create function tg_wslot_biu() returns opaque as '
|
create function tg_wslot_biu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if count(*) = 0 from Room where roomno = new.roomno then
|
if count(*) = 0 from Room where roomno = new.roomno then
|
||||||
raise exception ''Room % does not exist'', new.roomno;
|
raise exception ''Room % does not exist'', new.roomno;
|
||||||
@ -24,9 +24,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_wslot_biu before insert or update
|
create trigger tg_wslot_biu before insert or update
|
||||||
on WSlot for each row execute procedure tg_wslot_biu();
|
on WSlot for each row execute procedure tg_wslot_biu();
|
||||||
QUERY: create function tg_pfield_au() returns opaque as '
|
create function tg_pfield_au() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.name != old.name then
|
if new.name != old.name then
|
||||||
update PSlot set pfname = new.name where pfname = old.name;
|
update PSlot set pfname = new.name where pfname = old.name;
|
||||||
@ -34,17 +34,17 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_pfield_au after update
|
create trigger tg_pfield_au after update
|
||||||
on PField for each row execute procedure tg_pfield_au();
|
on PField for each row execute procedure tg_pfield_au();
|
||||||
QUERY: create function tg_pfield_ad() returns opaque as '
|
create function tg_pfield_ad() returns opaque as '
|
||||||
begin
|
begin
|
||||||
delete from PSlot where pfname = old.name;
|
delete from PSlot where pfname = old.name;
|
||||||
return old;
|
return old;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_pfield_ad after delete
|
create trigger tg_pfield_ad after delete
|
||||||
on PField for each row execute procedure tg_pfield_ad();
|
on PField for each row execute procedure tg_pfield_ad();
|
||||||
QUERY: create function tg_pslot_biu() returns opaque as '
|
create function tg_pslot_biu() returns opaque as '
|
||||||
declare
|
declare
|
||||||
pfrec record;
|
pfrec record;
|
||||||
rename new to ps;
|
rename new to ps;
|
||||||
@ -56,9 +56,9 @@ begin
|
|||||||
return ps;
|
return ps;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_pslot_biu before insert or update
|
create trigger tg_pslot_biu before insert or update
|
||||||
on PSlot for each row execute procedure tg_pslot_biu();
|
on PSlot for each row execute procedure tg_pslot_biu();
|
||||||
QUERY: create function tg_system_au() returns opaque as '
|
create function tg_system_au() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.name != old.name then
|
if new.name != old.name then
|
||||||
update IFace set sysname = new.name where sysname = old.name;
|
update IFace set sysname = new.name where sysname = old.name;
|
||||||
@ -66,9 +66,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_system_au after update
|
create trigger tg_system_au after update
|
||||||
on System for each row execute procedure tg_system_au();
|
on System for each row execute procedure tg_system_au();
|
||||||
QUERY: create function tg_iface_biu() returns opaque as '
|
create function tg_iface_biu() returns opaque as '
|
||||||
declare
|
declare
|
||||||
sname text;
|
sname text;
|
||||||
sysrec record;
|
sysrec record;
|
||||||
@ -87,9 +87,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_iface_biu before insert or update
|
create trigger tg_iface_biu before insert or update
|
||||||
on IFace for each row execute procedure tg_iface_biu();
|
on IFace for each row execute procedure tg_iface_biu();
|
||||||
QUERY: create function tg_hub_a() returns opaque as '
|
create function tg_hub_a() returns opaque as '
|
||||||
declare
|
declare
|
||||||
hname text;
|
hname text;
|
||||||
dummy integer;
|
dummy integer;
|
||||||
@ -111,9 +111,9 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_hub_a after insert or update or delete
|
create trigger tg_hub_a after insert or update or delete
|
||||||
on Hub for each row execute procedure tg_hub_a();
|
on Hub for each row execute procedure tg_hub_a();
|
||||||
QUERY: create function tg_hub_adjustslots(bpchar, integer, integer)
|
create function tg_hub_adjustslots(bpchar, integer, integer)
|
||||||
returns integer as '
|
returns integer as '
|
||||||
declare
|
declare
|
||||||
hname alias for $1;
|
hname alias for $1;
|
||||||
@ -134,7 +134,7 @@ begin
|
|||||||
return 0;
|
return 0;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create function tg_hslot_biu() returns opaque as '
|
create function tg_hslot_biu() returns opaque as '
|
||||||
declare
|
declare
|
||||||
sname text;
|
sname text;
|
||||||
xname HSlot.slotname%TYPE;
|
xname HSlot.slotname%TYPE;
|
||||||
@ -164,9 +164,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_hslot_biu before insert or update
|
create trigger tg_hslot_biu before insert or update
|
||||||
on HSlot for each row execute procedure tg_hslot_biu();
|
on HSlot for each row execute procedure tg_hslot_biu();
|
||||||
QUERY: create function tg_hslot_bd() returns opaque as '
|
create function tg_hslot_bd() returns opaque as '
|
||||||
declare
|
declare
|
||||||
hubrec record;
|
hubrec record;
|
||||||
begin
|
begin
|
||||||
@ -180,9 +180,9 @@ begin
|
|||||||
raise exception ''no manual manipulation of HSlot'';
|
raise exception ''no manual manipulation of HSlot'';
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_hslot_bd before delete
|
create trigger tg_hslot_bd before delete
|
||||||
on HSlot for each row execute procedure tg_hslot_bd();
|
on HSlot for each row execute procedure tg_hslot_bd();
|
||||||
QUERY: create function tg_chkslotname() returns opaque as '
|
create function tg_chkslotname() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if substr(new.slotname, 1, 2) != tg_argv[0] then
|
if substr(new.slotname, 1, 2) != tg_argv[0] then
|
||||||
raise exception ''slotname must begin with %'', tg_argv[0];
|
raise exception ''slotname must begin with %'', tg_argv[0];
|
||||||
@ -190,17 +190,17 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_chkslotname before insert
|
create trigger tg_chkslotname before insert
|
||||||
on PSlot for each row execute procedure tg_chkslotname('PS');
|
on PSlot for each row execute procedure tg_chkslotname('PS');
|
||||||
QUERY: create trigger tg_chkslotname before insert
|
create trigger tg_chkslotname before insert
|
||||||
on WSlot for each row execute procedure tg_chkslotname('WS');
|
on WSlot for each row execute procedure tg_chkslotname('WS');
|
||||||
QUERY: create trigger tg_chkslotname before insert
|
create trigger tg_chkslotname before insert
|
||||||
on PLine for each row execute procedure tg_chkslotname('PL');
|
on PLine for each row execute procedure tg_chkslotname('PL');
|
||||||
QUERY: create trigger tg_chkslotname before insert
|
create trigger tg_chkslotname before insert
|
||||||
on IFace for each row execute procedure tg_chkslotname('IF');
|
on IFace for each row execute procedure tg_chkslotname('IF');
|
||||||
QUERY: create trigger tg_chkslotname before insert
|
create trigger tg_chkslotname before insert
|
||||||
on PHone for each row execute procedure tg_chkslotname('PH');
|
on PHone for each row execute procedure tg_chkslotname('PH');
|
||||||
QUERY: create function tg_chkslotlink() returns opaque as '
|
create function tg_chkslotlink() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotlink isnull then
|
if new.slotlink isnull then
|
||||||
new.slotlink := '''';
|
new.slotlink := '''';
|
||||||
@ -208,17 +208,17 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_chkslotlink before insert or update
|
create trigger tg_chkslotlink before insert or update
|
||||||
on PSlot for each row execute procedure tg_chkslotlink();
|
on PSlot for each row execute procedure tg_chkslotlink();
|
||||||
QUERY: create trigger tg_chkslotlink before insert or update
|
create trigger tg_chkslotlink before insert or update
|
||||||
on WSlot for each row execute procedure tg_chkslotlink();
|
on WSlot for each row execute procedure tg_chkslotlink();
|
||||||
QUERY: create trigger tg_chkslotlink before insert or update
|
create trigger tg_chkslotlink before insert or update
|
||||||
on IFace for each row execute procedure tg_chkslotlink();
|
on IFace for each row execute procedure tg_chkslotlink();
|
||||||
QUERY: create trigger tg_chkslotlink before insert or update
|
create trigger tg_chkslotlink before insert or update
|
||||||
on HSlot for each row execute procedure tg_chkslotlink();
|
on HSlot for each row execute procedure tg_chkslotlink();
|
||||||
QUERY: create trigger tg_chkslotlink before insert or update
|
create trigger tg_chkslotlink before insert or update
|
||||||
on PHone for each row execute procedure tg_chkslotlink();
|
on PHone for each row execute procedure tg_chkslotlink();
|
||||||
QUERY: create function tg_chkbacklink() returns opaque as '
|
create function tg_chkbacklink() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.backlink isnull then
|
if new.backlink isnull then
|
||||||
new.backlink := '''';
|
new.backlink := '''';
|
||||||
@ -226,13 +226,13 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_chkbacklink before insert or update
|
create trigger tg_chkbacklink before insert or update
|
||||||
on PSlot for each row execute procedure tg_chkbacklink();
|
on PSlot for each row execute procedure tg_chkbacklink();
|
||||||
QUERY: create trigger tg_chkbacklink before insert or update
|
create trigger tg_chkbacklink before insert or update
|
||||||
on WSlot for each row execute procedure tg_chkbacklink();
|
on WSlot for each row execute procedure tg_chkbacklink();
|
||||||
QUERY: create trigger tg_chkbacklink before insert or update
|
create trigger tg_chkbacklink before insert or update
|
||||||
on PLine for each row execute procedure tg_chkbacklink();
|
on PLine for each row execute procedure tg_chkbacklink();
|
||||||
QUERY: create function tg_pslot_bu() returns opaque as '
|
create function tg_pslot_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname then
|
if new.slotname != old.slotname then
|
||||||
delete from PSlot where slotname = old.slotname;
|
delete from PSlot where slotname = old.slotname;
|
||||||
@ -252,9 +252,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_pslot_bu before update
|
create trigger tg_pslot_bu before update
|
||||||
on PSlot for each row execute procedure tg_pslot_bu();
|
on PSlot for each row execute procedure tg_pslot_bu();
|
||||||
QUERY: create function tg_wslot_bu() returns opaque as '
|
create function tg_wslot_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname then
|
if new.slotname != old.slotname then
|
||||||
delete from WSlot where slotname = old.slotname;
|
delete from WSlot where slotname = old.slotname;
|
||||||
@ -274,9 +274,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_wslot_bu before update
|
create trigger tg_wslot_bu before update
|
||||||
on WSlot for each row execute procedure tg_Wslot_bu();
|
on WSlot for each row execute procedure tg_Wslot_bu();
|
||||||
QUERY: create function tg_pline_bu() returns opaque as '
|
create function tg_pline_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname then
|
if new.slotname != old.slotname then
|
||||||
delete from PLine where slotname = old.slotname;
|
delete from PLine where slotname = old.slotname;
|
||||||
@ -296,9 +296,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_pline_bu before update
|
create trigger tg_pline_bu before update
|
||||||
on PLine for each row execute procedure tg_pline_bu();
|
on PLine for each row execute procedure tg_pline_bu();
|
||||||
QUERY: create function tg_iface_bu() returns opaque as '
|
create function tg_iface_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname then
|
if new.slotname != old.slotname then
|
||||||
delete from IFace where slotname = old.slotname;
|
delete from IFace where slotname = old.slotname;
|
||||||
@ -318,9 +318,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_iface_bu before update
|
create trigger tg_iface_bu before update
|
||||||
on IFace for each row execute procedure tg_iface_bu();
|
on IFace for each row execute procedure tg_iface_bu();
|
||||||
QUERY: create function tg_hslot_bu() returns opaque as '
|
create function tg_hslot_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname or new.hubname != old.hubname then
|
if new.slotname != old.slotname or new.hubname != old.hubname then
|
||||||
delete from HSlot where slotname = old.slotname;
|
delete from HSlot where slotname = old.slotname;
|
||||||
@ -340,9 +340,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_hslot_bu before update
|
create trigger tg_hslot_bu before update
|
||||||
on HSlot for each row execute procedure tg_hslot_bu();
|
on HSlot for each row execute procedure tg_hslot_bu();
|
||||||
QUERY: create function tg_phone_bu() returns opaque as '
|
create function tg_phone_bu() returns opaque as '
|
||||||
begin
|
begin
|
||||||
if new.slotname != old.slotname then
|
if new.slotname != old.slotname then
|
||||||
delete from PHone where slotname = old.slotname;
|
delete from PHone where slotname = old.slotname;
|
||||||
@ -360,9 +360,9 @@ begin
|
|||||||
return new;
|
return new;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_phone_bu before update
|
create trigger tg_phone_bu before update
|
||||||
on PHone for each row execute procedure tg_phone_bu();
|
on PHone for each row execute procedure tg_phone_bu();
|
||||||
QUERY: create function tg_backlink_a() returns opaque as '
|
create function tg_backlink_a() returns opaque as '
|
||||||
declare
|
declare
|
||||||
dummy integer;
|
dummy integer;
|
||||||
begin
|
begin
|
||||||
@ -395,13 +395,13 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_backlink_a after insert or update or delete
|
create trigger tg_backlink_a after insert or update or delete
|
||||||
on PSlot for each row execute procedure tg_backlink_a('PS');
|
on PSlot for each row execute procedure tg_backlink_a('PS');
|
||||||
QUERY: create trigger tg_backlink_a after insert or update or delete
|
create trigger tg_backlink_a after insert or update or delete
|
||||||
on WSlot for each row execute procedure tg_backlink_a('WS');
|
on WSlot for each row execute procedure tg_backlink_a('WS');
|
||||||
QUERY: create trigger tg_backlink_a after insert or update or delete
|
create trigger tg_backlink_a after insert or update or delete
|
||||||
on PLine for each row execute procedure tg_backlink_a('PL');
|
on PLine for each row execute procedure tg_backlink_a('PL');
|
||||||
QUERY: create function tg_backlink_set(bpchar, bpchar)
|
create function tg_backlink_set(bpchar, bpchar)
|
||||||
returns integer as '
|
returns integer as '
|
||||||
declare
|
declare
|
||||||
myname alias for $1;
|
myname alias for $1;
|
||||||
@ -423,7 +423,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 exists'', 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;
|
||||||
@ -433,7 +433,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 exists'', 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;
|
||||||
@ -443,7 +443,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 exists'', 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;
|
||||||
@ -453,7 +453,7 @@ begin
|
|||||||
raise exception ''illegal backlink beginning with %'', mytype;
|
raise exception ''illegal backlink beginning with %'', mytype;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create function tg_backlink_unset(bpchar, bpchar)
|
create function tg_backlink_unset(bpchar, bpchar)
|
||||||
returns integer as '
|
returns integer as '
|
||||||
declare
|
declare
|
||||||
myname alias for $1;
|
myname alias for $1;
|
||||||
@ -494,7 +494,7 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create function tg_slotlink_a() returns opaque as '
|
create function tg_slotlink_a() returns opaque as '
|
||||||
declare
|
declare
|
||||||
dummy integer;
|
dummy integer;
|
||||||
begin
|
begin
|
||||||
@ -527,17 +527,17 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create trigger tg_slotlink_a after insert or update or delete
|
create trigger tg_slotlink_a after insert or update or delete
|
||||||
on PSlot for each row execute procedure tg_slotlink_a('PS');
|
on PSlot for each row execute procedure tg_slotlink_a('PS');
|
||||||
QUERY: create trigger tg_slotlink_a after insert or update or delete
|
create trigger tg_slotlink_a after insert or update or delete
|
||||||
on WSlot for each row execute procedure tg_slotlink_a('WS');
|
on WSlot for each row execute procedure tg_slotlink_a('WS');
|
||||||
QUERY: create trigger tg_slotlink_a after insert or update or delete
|
create trigger tg_slotlink_a after insert or update or delete
|
||||||
on IFace for each row execute procedure tg_slotlink_a('IF');
|
on IFace for each row execute procedure tg_slotlink_a('IF');
|
||||||
QUERY: create trigger tg_slotlink_a after insert or update or delete
|
create trigger tg_slotlink_a after insert or update or delete
|
||||||
on HSlot for each row execute procedure tg_slotlink_a('HS');
|
on HSlot for each row execute procedure tg_slotlink_a('HS');
|
||||||
QUERY: create trigger tg_slotlink_a after insert or update or delete
|
create trigger tg_slotlink_a after insert or update or delete
|
||||||
on PHone for each row execute procedure tg_slotlink_a('PH');
|
on PHone for each row execute procedure tg_slotlink_a('PH');
|
||||||
QUERY: create function tg_slotlink_set(bpchar, bpchar)
|
create function tg_slotlink_set(bpchar, bpchar)
|
||||||
returns integer as '
|
returns integer as '
|
||||||
declare
|
declare
|
||||||
myname alias for $1;
|
myname alias for $1;
|
||||||
@ -567,7 +567,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 exists'', 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;
|
||||||
@ -577,7 +577,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 exists'', 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;
|
||||||
@ -587,7 +587,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 exists'', 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;
|
||||||
@ -597,7 +597,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 exists'', 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;
|
||||||
@ -607,7 +607,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 exists'', 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;
|
||||||
@ -617,7 +617,7 @@ begin
|
|||||||
raise exception ''illegal slotlink beginning with %'', mytype;
|
raise exception ''illegal slotlink beginning with %'', mytype;
|
||||||
end;
|
end;
|
||||||
' language 'plpgsql';
|
' language 'plpgsql';
|
||||||
QUERY: create function tg_slotlink_unset(bpchar, bpchar)
|
create function tg_slotlink_unset(bpchar, bpchar)
|
||||||
returns integer as '
|
returns integer as '
|
||||||
declare
|
declare
|
||||||
myname alias for $1;
|
myname alias for $1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
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
|
|||||||
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
|
|||||||
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
|
|||||||
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;
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
--
|
|
||||||
-- 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
|
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 ***"
|
||||||
destroydb $DB
|
dropdb $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
|
||||||
|
@ -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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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
|
|||||||
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 exists'', 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;
|
||||||
|
Reference in New Issue
Block a user