-- --------------------------------------------------
-- to create database CCC/eh2005 run this script from commandline using superuser marvin
-- --------------------------------------------------
-- prd: psql -d template1 -f /var/projekte/eh2005/crtdb.pgsql.txt -h localhost -p 5432 -U marvin
-- dev: psql -d template1 -f F:\CCC\eh2005\crtdb.pgsql.txt -h localhost -p 5432 -U marvin


-- --------------------------------------------------
-- set environment
-- --------------------------------------------------

\set ON_ERROR_STOP on


-- --------------------------------------------------
-- create database user eh2005
-- --------------------------------------------------

create user "eh2005"
  with sysid 2005
  encrypted password 'Osterhase2005'
  valid until 'infinity'
  nocreatedb nocreateuser
;


-- --------------------------------------------------
-- create tablespace eh2005
-- --------------------------------------------------

-- \! md e:\dbs\postgresql\data\pg_tblspc\eh2005
--  \! md /var/local/pgsql/data/pg_tblspc/eh2005

create tablespace eh2005
--  location 'e:/dbs/postgresql/data/pg_tblspc/eh2005'
  location '/var/local/pgsql/data/pg_tblspc/eh2005'
;

revoke all privileges on tablespace eh2005 from public;


-- --------------------------------------------------
-- create database eh2005
-- --------------------------------------------------

create database eh2005
  with encoding 'SQL_ASCII'
  tablespace eh2005
;
-- commenting database is only possible when connected to it
-- see below (after reconnect)

revoke all privileges on database eh2005 from public;
grant temporary on database eh2005 to "eh2005";


-- --------------------------------------------------
-- connect to new database eh2005 (by psql meta command)
-- --------------------------------------------------

\connect eh2005 marvin


-- --------------------------------------------------
-- add comment to database eh2005
-- --------------------------------------------------

-- commenting database is only possible when connected to it
comment on database eh2005 is 'CCC Easterhegg 2005';


-- --------------------------------------------------
-- restrict default database schema public
-- --------------------------------------------------

revoke all privileges on schema public from public;
grant usage on schema public to "eh2005";


-- --------------------------------------------------
-- create database schema eh2005
-- --------------------------------------------------

create schema eh2005;
comment on schema eh2005 is 'Easterhegg 2005 Default Schema';

revoke all privileges on schema eh2005 from public;
grant usage on schema eh2005 to "eh2005";


-- --------------------------------------------------
-- create table rooms
-- --------------------------------------------------

create sequence eh2005.seq_ro_id increment 1 start 1 cache 1 no cycle;

revoke all privileges on table eh2005.seq_ro_id from public;
grant select, update on table eh2005.seq_ro_id to "eh2005";

create table eh2005.tbl_rooms
  (
    ro_id int4 not null default nextval('eh2005.seq_ro_id'),
    ro_name varchar(255) not null,
    ro_schedpos int2 not null,
    ro_comment text,
    constraint prk_ro_id primary key (ro_id) using index tablespace eh2005,
    constraint sek_ro_name unique (ro_name) using index tablespace eh2005,
    constraint sek_ro_schedpos unique (ro_schedpos) using index tablespace eh2005,
    constraint chk_ro_name check (ro_name > '')
  )
  without oids
  tablespace eh2005
;

create unique index idx_ro_id on eh2005.tbl_rooms (ro_id) tablespace eh2005;
create unique index idx_ro_name on eh2005.tbl_rooms (ro_name) tablespace eh2005;
create unique index idx_ro_schedpos on eh2005.tbl_rooms (ro_schedpos) tablespace eh2005;

comment on table eh2005.tbl_rooms is 'rooms for workshops';

comment on column eh2005.tbl_rooms.ro_name is 'name of room';
comment on column eh2005.tbl_rooms.ro_schedpos is 'position of room in the schedule';

revoke all privileges on table eh2005.tbl_rooms from public;
grant select, insert, update, delete on table eh2005.tbl_rooms to "eh2005";


-- --------------------------------------------------
-- insert default rooms
-- --------------------------------------------------

insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (1, 'Work1 (OG)', 2, 'Workshopraum 1');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (2, 'Work2 (OG)', 3, 'Workshopraum 2');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (3, 'FunkAm (OG)', 4, 'Workshopraum 3');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (4, 'Work4 (EG)', 5, 'Workshopraum 4');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (5, 'Cafe2 (EG)', 6, 'hinterer Bereich des Cafe');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (6, 'Aula (OG)', 1, 'groe Aula');
insert into eh2005.tbl_rooms (ro_id, ro_name, ro_schedpos, ro_comment) values (7, 'Freifunk (OG)', 7, 'Freifunkraum');


-- --------------------------------------------------
-- create table workshops
-- --------------------------------------------------

create sequence eh2005.seq_ws_id increment 1 start 1 cache 1 no cycle;

revoke all privileges on table eh2005.seq_ws_id from public;
grant select, update on table eh2005.seq_ws_id to "eh2005";

create table eh2005.tbl_workshops
  (
    ws_id int4 not null default nextval('eh2005.seq_ws_id'),
    ws_name varchar(255) not null,
    ws_duration int2,
    ws_speakers varchar(255),
    ws_content text,
    ws_comment text,
    constraint prk_ws_id primary key (ws_id) using index tablespace eh2005,
    constraint sek_ws_name unique (ws_name) using index tablespace eh2005,
    constraint chk_ws_name check (ws_name > '')
  )
  without oids
  tablespace eh2005
;

create unique index idx_ws_id on eh2005.tbl_workshops (ws_id) tablespace eh2005;
create unique index idx_ws_name on eh2005.tbl_workshops (ws_name) tablespace eh2005;

comment on table eh2005.tbl_workshops is 'workshops';

comment on column eh2005.tbl_workshops.ws_name is 'name of workshop';
comment on column eh2005.tbl_workshops.ws_duration is 'duration of workshop';
comment on column eh2005.tbl_workshops.ws_speakers is 'speakers of workshop';
comment on column eh2005.tbl_workshops.ws_content is 'content description of workshop';

revoke all privileges on table eh2005.tbl_workshops from public;
grant select, insert, update, delete on table eh2005.tbl_workshops to "eh2005";


-- --------------------------------------------------
-- insert default workshops
-- --------------------------------------------------

insert into eh2005.tbl_workshops (ws_name) values ('Amateurfunk');
insert into eh2005.tbl_workshops (ws_name) values ('Versammlung DARC OV D23');
insert into eh2005.tbl_workshops (ws_name) values ('CACert Assurance');
insert into eh2005.tbl_workshops (ws_name) values ('Ethernet Switching');
insert into eh2005.tbl_workshops (ws_name) values ('Holographie');
insert into eh2005.tbl_workshops (ws_name) values ('SPL und WebSPL - Yet another programming paradigm');
insert into eh2005.tbl_workshops (ws_name) values ('Subjekt, Krper und Medienethik der Netzkultur');
insert into eh2005.tbl_workshops (ws_name) values ('UNIX History');
insert into eh2005.tbl_workshops (ws_name) values ('IPv6');
insert into eh2005.tbl_workshops (ws_name) values ('Diet-Linux');
insert into eh2005.tbl_workshops (ws_name) values ('Wie werde ich einfache Rootkits los');
insert into eh2005.tbl_workshops (ws_name) values ('ProzessorDesign');
insert into eh2005.tbl_workshops (ws_name) values ('Bagatellverletzungen');
insert into eh2005.tbl_workshops (ws_name) values ('Serielle Schnittstellen am WLAN-Router');
insert into eh2005.tbl_workshops (ws_name) values ('openwrt buildroot fuer Anfaenger');
insert into eh2005.tbl_workshops (ws_name) values ('Biometrie');
insert into eh2005.tbl_workshops (ws_name) values ('offene Telefonie');
insert into eh2005.tbl_workshops (ws_name) values ('CCC Regiotreff');
insert into eh2005.tbl_workshops (ws_name) values ('Verschlsselte (Root-)Dateisysteme');
insert into eh2005.tbl_workshops (ws_name) values ('TextTools');
insert into eh2005.tbl_workshops (ws_name) values ('Presseworkshop');
insert into eh2005.tbl_workshops (ws_name) values ('Mobile IP mit OLSR und TINC');
insert into eh2005.tbl_workshops (ws_name) values ('www.ccc.de rebuild');
insert into eh2005.tbl_workshops (ws_name) values ('Externe Mailanfragestruktur des CCC umbauen');
insert into eh2005.tbl_workshops (ws_name) values ('Erstellung und Mastering der Chaos-DVDs');
insert into eh2005.tbl_workshops (ws_name) values ('Projekt P');
insert into eh2005.tbl_workshops (ws_name) values ('Pentabarf Developer Meeting');
insert into eh2005.tbl_workshops (ws_name) values ('What the Hack');
insert into eh2005.tbl_workshops (ws_name) values ('Bootup-Sounds und Klingeltne fr freie Betriebssysteme');

-- --------------------------------------------------
-- create table schedule
-- --------------------------------------------------

create sequence eh2005.seq_sd_id increment 1 start 1 cache 1 no cycle;

revoke all privileges on table eh2005.seq_sd_id from public;
grant select, update on table eh2005.seq_sd_id to "eh2005";

create table eh2005.tbl_schedule
  (
    sd_id int4 not null default nextval('eh2005.seq_sd_id'),
    sd_begintime timestamp not null,
    sd_endtime timestamp not null,
    sd_ro_id int4 not null,
    sd_ws_id int4,
    sd_comment text,
    constraint prk_sd_id primary key (sd_id) using index tablespace eh2005,
    constraint sek_sd_rots unique (sd_begintime, sd_ro_id) using index tablespace eh2005,
    constraint frk_sd_ro_id foreign key (sd_ro_id) references eh2005.tbl_rooms (ro_id) on delete restrict on update cascade,
    constraint frk_sd_ws_id foreign key (sd_ws_id) references eh2005.tbl_workshops (ws_id) on delete restrict on update restrict
  )
  without oids
  tablespace eh2005
;

create index idx_sd_begintime on eh2005.tbl_schedule (sd_begintime) tablespace eh2005;
create index idx_sd_endtime on eh2005.tbl_schedule (sd_endtime) tablespace eh2005;
create index idx_sd_ro_id on eh2005.tbl_schedule (sd_ro_id) tablespace eh2005;
create index idx_sd_ws_id on eh2005.tbl_schedule (sd_ws_id) tablespace eh2005;

comment on table eh2005.tbl_schedule is 'schedule = workshops in rooms during timeslots';

comment on column eh2005.tbl_schedule.sd_begintime is 'begin of schedule timeslot';
comment on column eh2005.tbl_schedule.sd_endtime is 'end of schedule timeslot';
comment on column eh2005.tbl_schedule.sd_ro_id is 'room of scheduled event';
comment on column eh2005.tbl_schedule.sd_ws_id is 'workshop of scheduled event';

revoke all privileges on table eh2005.tbl_schedule from public;
grant select, insert, update, delete on table eh2005.tbl_schedule to "eh2005";

-- --------------------------------------------------
-- insert default schedule
-- --------------------------------------------------

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 1);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 2);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 3);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 4);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 5);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 6);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 12:00:00' ,timestamp '2005-03-25 13:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 13:00:00' ,timestamp '2005-03-25 14:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 14:00:00' ,timestamp '2005-03-25 15:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 15:00:00' ,timestamp '2005-03-25 16:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 16:00:00' ,timestamp '2005-03-25 17:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 17:00:00' ,timestamp '2005-03-25 18:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 18:00:00' ,timestamp '2005-03-25 19:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 19:00:00' ,timestamp '2005-03-25 20:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 20:00:00' ,timestamp '2005-03-25 21:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-25 21:00:00' ,timestamp '2005-03-25 22:00:00', 7);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 1);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 2);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 3);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 4);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 5);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 6);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 11:00:00' ,timestamp '2005-03-26 12:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 12:00:00' ,timestamp '2005-03-26 13:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 13:00:00' ,timestamp '2005-03-26 14:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 14:00:00' ,timestamp '2005-03-26 15:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 15:00:00' ,timestamp '2005-03-26 16:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 16:00:00' ,timestamp '2005-03-26 17:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 17:00:00' ,timestamp '2005-03-26 18:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 18:00:00' ,timestamp '2005-03-26 19:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 19:00:00' ,timestamp '2005-03-26 20:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 20:00:00' ,timestamp '2005-03-26 21:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-26 21:00:00' ,timestamp '2005-03-26 22:00:00', 7);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 1);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 2);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 3);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 4);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 5);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 6);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 11:00:00' ,timestamp '2005-03-27 12:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 12:00:00' ,timestamp '2005-03-27 13:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 13:00:00' ,timestamp '2005-03-27 14:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 14:00:00' ,timestamp '2005-03-27 15:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 15:00:00' ,timestamp '2005-03-27 16:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 16:00:00' ,timestamp '2005-03-27 17:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 17:00:00' ,timestamp '2005-03-27 18:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 18:00:00' ,timestamp '2005-03-27 19:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 19:00:00' ,timestamp '2005-03-27 20:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 20:00:00' ,timestamp '2005-03-27 21:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-27 21:00:00' ,timestamp '2005-03-27 22:00:00', 7);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 1);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 1);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 2);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 2);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 3);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 3);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 4);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 4);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 5);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 5);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 6);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 6);

insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 11:00:00' ,timestamp '2005-03-28 12:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 12:00:00' ,timestamp '2005-03-28 13:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 13:00:00' ,timestamp '2005-03-28 14:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 14:00:00' ,timestamp '2005-03-28 15:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 15:00:00' ,timestamp '2005-03-28 16:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 16:00:00' ,timestamp '2005-03-28 17:00:00', 7);
insert into eh2005.tbl_schedule (sd_begintime, sd_endtime, sd_ro_id) values (timestamp '2005-03-28 17:00:00' ,timestamp '2005-03-28 18:00:00', 7);

revoke all privileges on table eh2005.tbl_schedule from public;
grant select, insert, update, delete on table eh2005.tbl_schedule to "eh2005";
