summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-01-17 00:37:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-06-13 17:29:46 +0100
commitdc64918d476d131cc147d1fe574ae1e6f104279d (patch)
tree8d9009e87dd1b8837e7385700689cc5ac6bcbf78
parentActually throw the exceptions in deserialize object and tidy up the select (diff)
downloadp2pvr-dc64918d476d131cc147d1fe574ae1e6f104279d.tar.bz2
p2pvr-dc64918d476d131cc147d1fe574ae1e6f104279d.tar.xz
p2pvr-dc64918d476d131cc147d1fe574ae1e6f104279d.zip
Add view that unions all the deliveries along with their type ids
-rw-r--r--p2pvr/datasources/schema.sql84
1 files changed, 84 insertions, 0 deletions
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
@@ -130,6 +130,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: -
--