Project

General

Profile

« Previous | Next » 

Revision 12585

schemas/vegbien.sql: added place_visit view, analogous to plot but for top-level locationevents. this is needed by the SALVIAS validation queries.

View differences:

trunk/schemas/vegbien.my.sql
3586 3586

  
3587 3587

  
3588 3588
--
3589
-- Name: place_visit; Type: VIEW; Schema: public; Owner: -
3590
--
3591

  
3592

  
3593

  
3594

  
3595
--
3596
-- Name: VIEW place_visit; Type: COMMENT; Schema: public; Owner: -
3597
--
3598

  
3599

  
3600

  
3601

  
3602
--
3589 3603
-- Name: placecorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
3590 3604
--
3591 3605

  
......
11034 11048

  
11035 11049

  
11036 11050
--
11051
-- Name: place_visit; Type: ACL; Schema: public; Owner: -
11052
--
11053

  
11054

  
11055

  
11056

  
11057

  
11058

  
11059

  
11060
--
11037 11061
-- Name: placecorrelation; Type: ACL; Schema: public; Owner: -
11038 11062
--
11039 11063

  
trunk/schemas/vegbien.sql
5848 5848

  
5849 5849

  
5850 5850
--
5851
-- Name: place_visit; Type: VIEW; Schema: public; Owner: -
5852
--
5853

  
5854
CREATE VIEW place_visit AS
5855
 SELECT locationevent.locationevent_id, 
5856
    locationevent.source_id, 
5857
    locationevent.sourceaccessioncode, 
5858
    locationevent.accesslevel, 
5859
    locationevent.place_visit_id, 
5860
    locationevent.parent_id, 
5861
    locationevent.location_id, 
5862
    locationevent.project_id, 
5863
    locationevent.stratum_id, 
5864
    locationevent.authoreventcode, 
5865
    locationevent.previous_id, 
5866
    locationevent.obsstartdate, 
5867
    locationevent.obsenddate, 
5868
    locationevent.dateaccuracy, 
5869
    locationevent.method_id, 
5870
    locationevent.temperature_c, 
5871
    locationevent.precipitation_m, 
5872
    locationevent.autotaxoncover, 
5873
    locationevent.originaldata, 
5874
    locationevent.effortlevel, 
5875
    locationevent.floristicquality, 
5876
    locationevent.bryophytequality, 
5877
    locationevent.lichenquality, 
5878
    locationevent.locationeventnarrative, 
5879
    locationevent.landscapenarrative, 
5880
    locationevent.homogeneity, 
5881
    locationevent.phenologicaspect, 
5882
    locationevent.representativeness, 
5883
    locationevent.standmaturity, 
5884
    locationevent.successionalstatus, 
5885
    locationevent.basalarea, 
5886
    locationevent.hydrologicregime, 
5887
    locationevent.soilmoistureregime, 
5888
    locationevent.soildrainage, 
5889
    locationevent.watersalinity, 
5890
    locationevent.waterdepth_m, 
5891
    locationevent.shoredistance, 
5892
    locationevent.soildepth, 
5893
    locationevent.organicdepth, 
5894
    locationevent.soiltaxon_id, 
5895
    locationevent.soiltaxonsrc, 
5896
    locationevent.percentbedrock, 
5897
    locationevent.percentrockgravel, 
5898
    locationevent.percentwood, 
5899
    locationevent.percentlitter, 
5900
    locationevent.percentbaresoil, 
5901
    locationevent.percentwater, 
5902
    locationevent.percentother, 
5903
    locationevent.nameother, 
5904
    locationevent.treeht, 
5905
    locationevent.shrubht, 
5906
    locationevent.fieldht, 
5907
    locationevent.nonvascularht, 
5908
    locationevent.submergedht, 
5909
    locationevent.treecover, 
5910
    locationevent.shrubcover, 
5911
    locationevent.fieldcover, 
5912
    locationevent.nonvascularcover, 
5913
    locationevent.floatingcover, 
5914
    locationevent.submergedcover, 
5915
    locationevent.dominantstratum, 
5916
    locationevent.growthform1type, 
5917
    locationevent.growthform2type, 
5918
    locationevent.growthform3type, 
5919
    locationevent.growthform1cover, 
5920
    locationevent.growthform2cover, 
5921
    locationevent.growthform3cover, 
5922
    locationevent.totalcover, 
5923
    locationevent.notespublic, 
5924
    locationevent.notesmgt, 
5925
    locationevent.revisions, 
5926
    locationevent.dateentered, 
5927
    locationevent.toptaxon1name, 
5928
    locationevent.toptaxon2name, 
5929
    locationevent.toptaxon3name, 
5930
    locationevent.toptaxon4name, 
5931
    locationevent.toptaxon5name, 
5932
    locationevent.numberoftaxa
5933
   FROM locationevent
5934
  WHERE (locationevent.parent_id IS NULL);
5935

  
5936

  
5937
--
5938
-- Name: VIEW place_visit; Type: COMMENT; Schema: public; Owner: -
5939
--
5940

  
5941
COMMENT ON VIEW place_visit IS '
5942
when updating, use * as the column list
5943
';
5944

  
5945

  
5946
--
5851 5947
-- Name: placecorrelation; Type: TABLE; Schema: public; Owner: -; Tablespace: 
5852 5948
--
5853 5949

  
......
13854 13950

  
13855 13951

  
13856 13952
--
13953
-- Name: place_visit; Type: ACL; Schema: public; Owner: -
13954
--
13955

  
13956
REVOKE ALL ON TABLE place_visit FROM PUBLIC;
13957
REVOKE ALL ON TABLE place_visit FROM bien;
13958
GRANT ALL ON TABLE place_visit TO bien;
13959
GRANT SELECT ON TABLE place_visit TO bien_read;
13960

  
13961

  
13962
--
13857 13963
-- Name: placecorrelation; Type: ACL; Schema: public; Owner: -
13858 13964
--
13859 13965

  

Also available in: Unified diff