Revision 12253
Added by Aaron Marcuse-Kubitza about 11 years ago
vegbien.sql | ||
---|---|---|
711 | 711 |
$_$; |
712 | 712 |
|
713 | 713 |
|
714 |
SET default_tablespace = ''; |
|
715 |
|
|
716 |
SET default_with_oids = false; |
|
717 |
|
|
718 | 714 |
-- |
719 |
-- Name: source; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
720 |
-- |
|
721 |
|
|
722 |
CREATE TABLE source ( |
|
723 |
source_id integer NOT NULL, |
|
724 |
matched_source_id integer, |
|
725 |
parent_id integer, |
|
726 |
shortname text NOT NULL, |
|
727 |
citation text, |
|
728 |
sourcetype sourcetype, |
|
729 |
accesslevel accesslevel, |
|
730 |
accessconditions text, |
|
731 |
observationtype observationtype, |
|
732 |
title text, |
|
733 |
titlesuperior text, |
|
734 |
volume text, |
|
735 |
issue text, |
|
736 |
pagerange text, |
|
737 |
totalpages integer, |
|
738 |
publisher text, |
|
739 |
publicationplace text, |
|
740 |
isbn text, |
|
741 |
edition text, |
|
742 |
numberofvolumes integer, |
|
743 |
chapternumber integer, |
|
744 |
reportnumber integer, |
|
745 |
communicationtype text, |
|
746 |
degree text, |
|
747 |
url text, |
|
748 |
doi text, |
|
749 |
additionalinfo text, |
|
750 |
pubdate date, |
|
751 |
accessdate date, |
|
752 |
conferencedate date, |
|
753 |
datecreated date DEFAULT now() NOT NULL, |
|
754 |
createdby text, |
|
755 |
datelastmodified date DEFAULT now() NOT NULL, |
|
756 |
lastmodifiedby text, |
|
757 |
import_revision text |
|
758 |
); |
|
759 |
|
|
760 |
|
|
761 |
-- |
|
762 | 715 |
-- Name: datasource_publish(text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
763 | 716 |
-- |
764 | 717 |
|
765 |
CREATE FUNCTION datasource_publish(datasource text, schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
718 |
CREATE FUNCTION datasource_publish(datasource text, schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
766 | 719 |
LANGUAGE plpgsql |
767 | 720 |
AS $$ |
768 | 721 |
DECLARE |
... | ... | |
794 | 747 |
-- Name: datasource_rename(text, text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
795 | 748 |
-- |
796 | 749 |
|
797 |
CREATE FUNCTION datasource_rename(old text, new text, schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
750 |
CREATE FUNCTION datasource_rename(old text, new text, schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
798 | 751 |
LANGUAGE sql |
799 | 752 |
AS $_$ |
800 | 753 |
SELECT set_config('search_path', util.schema_esc($3), true); |
... | ... | |
817 | 770 |
-- Name: datasource_rm(text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
818 | 771 |
-- |
819 | 772 |
|
820 |
CREATE FUNCTION datasource_rm(datasource text, schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
773 |
CREATE FUNCTION datasource_rm(datasource text, schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
821 | 774 |
LANGUAGE sql |
822 | 775 |
AS $_$ |
823 | 776 |
SELECT set_config('search_path', util.schema_esc($2), true); |
... | ... | |
850 | 803 |
-- Name: datasource_unpublish(text, anyelement); Type: FUNCTION; Schema: public; Owner: - |
851 | 804 |
-- |
852 | 805 |
|
853 |
CREATE FUNCTION datasource_unpublish(datasource text, schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
806 |
CREATE FUNCTION datasource_unpublish(datasource text, schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
854 | 807 |
LANGUAGE sql |
855 | 808 |
AS $_$ |
856 | 809 |
SELECT set_config('search_path', util.schema_esc($3), true); |
... | ... | |
1156 | 1109 |
$$; |
1157 | 1110 |
|
1158 | 1111 |
|
1112 |
SET default_tablespace = ''; |
|
1113 |
|
|
1114 |
SET default_with_oids = false; |
|
1115 |
|
|
1159 | 1116 |
-- |
1160 | 1117 |
-- Name: place; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1161 | 1118 |
-- |
... | ... | |
1382 | 1339 |
-- Name: publish(anyelement); Type: FUNCTION; Schema: public; Owner: - |
1383 | 1340 |
-- |
1384 | 1341 |
|
1385 |
CREATE FUNCTION publish(schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
1342 |
CREATE FUNCTION publish(schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
1386 | 1343 |
LANGUAGE plpgsql |
1387 | 1344 |
AS $$ |
1388 | 1345 |
BEGIN |
... | ... | |
1413 | 1370 |
-- Name: rm(anyelement); Type: FUNCTION; Schema: public; Owner: - |
1414 | 1371 |
-- |
1415 | 1372 |
|
1416 |
CREATE FUNCTION rm(schema_null anyelement DEFAULT NULL::source) RETURNS void
|
|
1373 |
CREATE FUNCTION rm(schema_null anyelement DEFAULT NULL::schema_anchor) RETURNS void
|
|
1417 | 1374 |
LANGUAGE plpgsql |
1418 | 1375 |
AS $$ |
1419 | 1376 |
BEGIN |
... | ... | |
2828 | 2785 |
|
2829 | 2786 |
|
2830 | 2787 |
-- |
2788 |
-- Name: source; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2789 |
-- |
|
2790 |
|
|
2791 |
CREATE TABLE source ( |
|
2792 |
source_id integer NOT NULL, |
|
2793 |
matched_source_id integer, |
|
2794 |
parent_id integer, |
|
2795 |
shortname text NOT NULL, |
|
2796 |
citation text, |
|
2797 |
sourcetype sourcetype, |
|
2798 |
accesslevel accesslevel, |
|
2799 |
accessconditions text, |
|
2800 |
observationtype observationtype, |
|
2801 |
title text, |
|
2802 |
titlesuperior text, |
|
2803 |
volume text, |
|
2804 |
issue text, |
|
2805 |
pagerange text, |
|
2806 |
totalpages integer, |
|
2807 |
publisher text, |
|
2808 |
publicationplace text, |
|
2809 |
isbn text, |
|
2810 |
edition text, |
|
2811 |
numberofvolumes integer, |
|
2812 |
chapternumber integer, |
|
2813 |
reportnumber integer, |
|
2814 |
communicationtype text, |
|
2815 |
degree text, |
|
2816 |
url text, |
|
2817 |
doi text, |
|
2818 |
additionalinfo text, |
|
2819 |
pubdate date, |
|
2820 |
accessdate date, |
|
2821 |
conferencedate date, |
|
2822 |
datecreated date DEFAULT now() NOT NULL, |
|
2823 |
createdby text, |
|
2824 |
datelastmodified date DEFAULT now() NOT NULL, |
|
2825 |
lastmodifiedby text, |
|
2826 |
import_revision text |
|
2827 |
); |
|
2828 |
|
|
2829 |
|
|
2830 |
-- |
|
2831 | 2831 |
-- Name: stratum; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2832 | 2832 |
-- |
2833 | 2833 |
|
... | ... | |
11558 | 11558 |
|
11559 | 11559 |
|
11560 | 11560 |
-- |
11561 |
-- Name: source; Type: ACL; Schema: public; Owner: - |
|
11562 |
-- |
|
11563 |
|
|
11564 |
REVOKE ALL ON TABLE source FROM PUBLIC; |
|
11565 |
REVOKE ALL ON TABLE source FROM bien; |
|
11566 |
GRANT ALL ON TABLE source TO bien; |
|
11567 |
GRANT SELECT ON TABLE source TO bien_read; |
|
11568 |
GRANT SELECT ON TABLE source TO public_; |
|
11569 |
|
|
11570 |
|
|
11571 |
-- |
|
11572 | 11561 |
-- Name: place; Type: ACL; Schema: public; Owner: - |
11573 | 11562 |
-- |
11574 | 11563 |
|
... | ... | |
11750 | 11739 |
|
11751 | 11740 |
|
11752 | 11741 |
-- |
11742 |
-- Name: source; Type: ACL; Schema: public; Owner: - |
|
11743 |
-- |
|
11744 |
|
|
11745 |
REVOKE ALL ON TABLE source FROM PUBLIC; |
|
11746 |
REVOKE ALL ON TABLE source FROM bien; |
|
11747 |
GRANT ALL ON TABLE source TO bien; |
|
11748 |
GRANT SELECT ON TABLE source TO bien_read; |
|
11749 |
GRANT SELECT ON TABLE source TO public_; |
|
11750 |
|
|
11751 |
|
|
11752 |
-- |
|
11753 | 11753 |
-- Name: stratum; Type: ACL; Schema: public; Owner: - |
11754 | 11754 |
-- |
11755 | 11755 |
|
Also available in: Unified diff
schemas/vegbien.sql: schema_null params: use schema_anchor instead of source for this, since it is guaranteed to exist regardless of which tables are in the VegBIEN schema