From dc64918d476d131cc147d1fe574ae1e6f104279d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 17 Jan 2015 00:37:26 +0000 Subject: Add view that unions all the deliveries along with their type ids --- p2pvr/datasources/schema.sql | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/p2pvr/datasources/schema.sql b/p2pvr/datasources/schema.sql index 5e0612f..446906d 100644 --- a/p2pvr/datasources/schema.sql +++ b/p2pvr/datasources/schema.sql @@ -129,6 +129,90 @@ CREATE TABLE delivery_dvbt ( ); +-- +-- Name: alldeliveries; Type: VIEW; Schema: public; Owner: - +-- + +CREATE VIEW alldeliveries AS + SELECT '::DVBSI::TerrestrialDelivery'::text AS delivery_type, + delivery_dvbt.transportstreamid, + delivery_dvbt.bandwidth, + delivery_dvbt.coderatehp, + delivery_dvbt.coderatelp, + delivery_dvbt.constellation, + NULL::smallint AS fecinner, + NULL::smallint AS fecouter, + delivery_dvbt.frequency, + delivery_dvbt.guardinterval, + delivery_dvbt.hierarchy, + NULL::smallint AS modulation, + NULL::boolean AS modulationsystem, + NULL::smallint AS modulationtype, + delivery_dvbt.mpefec, + NULL::integer AS orbitalposition, + delivery_dvbt.otherfrequencyflag, + NULL::smallint AS polarization, + delivery_dvbt.priority, + NULL::smallint AS rolloff, + NULL::integer AS symbolrate, + delivery_dvbt.timeslicing, + delivery_dvbt.transmissionmode, + NULL::boolean AS westeastflag + FROM delivery_dvbt +UNION ALL + SELECT '::DVBSI::CableDelivery'::text AS delivery_type, + delivery_dvbc.transportstreamid, + NULL::smallint AS bandwidth, + NULL::smallint AS coderatehp, + NULL::smallint AS coderatelp, + NULL::smallint AS constellation, + delivery_dvbc.fecinner, + delivery_dvbc.fecouter, + delivery_dvbc.frequency, + NULL::smallint AS guardinterval, + NULL::smallint AS hierarchy, + delivery_dvbc.modulation, + NULL::boolean AS modulationsystem, + NULL::smallint AS modulationtype, + NULL::boolean AS mpefec, + NULL::integer AS orbitalposition, + NULL::boolean AS otherfrequencyflag, + NULL::smallint AS polarization, + NULL::boolean AS priority, + NULL::smallint AS rolloff, + delivery_dvbc.symbolrate, + NULL::boolean AS timeslicing, + NULL::smallint AS transmissionmode, + NULL::boolean AS westeastflag + FROM delivery_dvbc +UNION ALL + SELECT '::DVBSI::SatelliteDelivery'::text AS delivery_type, + delivery_dvbs.transportstreamid, + NULL::smallint AS bandwidth, + NULL::smallint AS coderatehp, + NULL::smallint AS coderatelp, + NULL::smallint AS constellation, + delivery_dvbs.fecinner, + NULL::smallint AS fecouter, + delivery_dvbs.frequency, + NULL::smallint AS guardinterval, + NULL::smallint AS hierarchy, + NULL::smallint AS modulation, + delivery_dvbs.modulationsystem, + delivery_dvbs.modulationtype, + NULL::boolean AS mpefec, + delivery_dvbs.orbitalposition, + NULL::boolean AS otherfrequencyflag, + NULL::smallint AS polarization, + NULL::boolean AS priority, + delivery_dvbs.rolloff, + delivery_dvbs.symbolrate, + NULL::boolean AS timeslicing, + NULL::smallint AS transmissionmode, + delivery_dvbs.westeastflag + FROM delivery_dvbs; + + -- -- Name: events_eventuid_seq; Type: SEQUENCE; Schema: public; Owner: - -- -- cgit v1.2.3