diff --git a/db/dist/base.sql b/db/dist/base.sql index 257fd47f..0c8898a6 100644 --- a/db/dist/base.sql +++ b/db/dist/base.sql @@ -1,12 +1,9 @@ - SET statement_timeout = 0; -SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -SET row_security = off; @@ -2042,110 +2039,7 @@ COMMENT ON COLUMN "table".url IS 'A URL for a landing page for this table.'; CREATE VIEW vw_gcmd_keyword AS - SELECT COALESCE(level4.identifier, level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - level3.label AS level3, - level4.label AS level4 - FROM (((((((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) - JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) - JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) - JOIN gcmd_keyword level3 ON (((level3.parent_identifier)::text = (level2.identifier)::text))) - JOIN gcmd_keyword level4 ON (((level4.parent_identifier)::text = (level3.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - level3.label AS level3, - NULL::character varying AS level4 - FROM ((((((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) - JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) - JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) - JOIN gcmd_keyword level3 ON (((level3.parent_identifier)::text = (level2.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM (((((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) - JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) - JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM ((((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) - JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM (((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - NULL::character varying AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM ((gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) -UNION - SELECT COALESCE(category.identifier) AS identifier, - category.label AS category, - NULL::character varying AS topic, - NULL::character varying AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM (gcmd_keyword wrapper - JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) - WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)); + (((((SELECT COALESCE(level4.identifier, level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, term.label AS term, level1.label AS level1, level2.label AS level2, level3.label AS level3, level4.label AS level4 FROM (((((((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) JOIN gcmd_keyword level3 ON (((level3.parent_identifier)::text = (level2.identifier)::text))) JOIN gcmd_keyword level4 ON (((level4.parent_identifier)::text = (level3.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)) UNION SELECT COALESCE(level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, term.label AS term, level1.label AS level1, level2.label AS level2, level3.label AS level3, NULL::character varying AS level4 FROM ((((((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) JOIN gcmd_keyword level3 ON (((level3.parent_identifier)::text = (level2.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text))) UNION SELECT COALESCE(level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, term.label AS term, level1.label AS level1, level2.label AS level2, NULL::character varying AS level3, NULL::character varying AS level4 FROM (((((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) JOIN gcmd_keyword level2 ON (((level2.parent_identifier)::text = (level1.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text))) UNION SELECT COALESCE(level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, term.label AS term, level1.label AS level1, NULL::character varying AS level2, NULL::character varying AS level3, NULL::character varying AS level4 FROM ((((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) JOIN gcmd_keyword level1 ON (((level1.parent_identifier)::text = (term.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text))) UNION SELECT COALESCE(term.identifier, topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, term.label AS term, NULL::character varying AS level1, NULL::character varying AS level2, NULL::character varying AS level3, NULL::character varying AS level4 FROM (((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) JOIN gcmd_keyword term ON (((term.parent_identifier)::text = (topic.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text))) UNION SELECT COALESCE(topic.identifier, category.identifier) AS identifier, category.label AS category, topic.label AS topic, NULL::character varying AS term, NULL::character varying AS level1, NULL::character varying AS level2, NULL::character varying AS level3, NULL::character varying AS level4 FROM ((gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) JOIN gcmd_keyword topic ON (((topic.parent_identifier)::text = (category.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text))) UNION SELECT COALESCE(category.identifier) AS identifier, category.label AS category, NULL::character varying AS topic, NULL::character varying AS term, NULL::character varying AS level1, NULL::character varying AS level2, NULL::character varying AS level3, NULL::character varying AS level4 FROM (gcmd_keyword wrapper JOIN gcmd_keyword category ON (((category.parent_identifier)::text = (wrapper.identifier)::text))) WHERE (((wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text) AND ((wrapper.label)::text = 'Science Keywords'::text)); diff --git a/db/dist/base_data.sql b/db/dist/base_data.sql index 7e8fc604..ca79e205 100644 --- a/db/dist/base_data.sql +++ b/db/dist/base_data.sql @@ -2,16 +2,11 @@ -- PostgreSQL database dump -- --- Dumped from database version 9.6.5 --- Dumped by pg_dump version 9.6.5 - SET statement_timeout = 0; -SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -SET row_security = off; -- diff --git a/db/dist/docs/html/contents.html b/db/dist/docs/html/contents.html index e3c9a369..7d993e9e 100644 --- a/db/dist/docs/html/contents.html +++ b/db/dist/docs/html/contents.html @@ -274,7 +274,7 @@ delete_publication()
-each(value gcis_metadata.hstore) +each(hs gcis_metadata.hstore)
ean13_in(cstring) @@ -307,7 +307,7 @@ ghstore_compress(internal)
-ghstore_consistent(internal, gcis_metadata.hstore, smallint, oid, internal) +ghstore_consistent(internal, internal, integer, oid, internal)
ghstore_decompress(internal) @@ -325,19 +325,19 @@ ghstore_picksplit(internal, internal)
-ghstore_same(gcis_metadata.ghstore, gcis_metadata.ghstore, internal) +ghstore_same(internal, internal, internal)
ghstore_union(internal, internal)
-gin_consistent_hstore(internal, smallint, gcis_metadata.hstore, integer, internal, internal) +gin_consistent_hstore(internal, smallint, internal, integer, internal, internal)
-gin_extract_hstore(gcis_metadata.hstore, internal) +gin_extract_hstore(internal, internal)
-gin_extract_hstore_query(gcis_metadata.hstore, internal, smallint, internal, internal) +gin_extract_hstore_query(internal, internal, smallint, internal, internal)
hashean13(gcis_metadata.ean13) @@ -424,18 +424,6 @@ hstore_to_array(gcis_metadata.hstore)
-hstore_to_json(gcis_metadata.hstore) -
- -hstore_to_json_loose(gcis_metadata.hstore) -
- -hstore_to_jsonb(gcis_metadata.hstore) -
- -hstore_to_jsonb_loose(gcis_metadata.hstore) -
- hstore_to_matrix(gcis_metadata.hstore)
@@ -1054,10 +1042,10 @@ make_valid(gcis_metadata.upc)
-name_hash(last_name text, first_name text) +name_hash(first_name text, last_name text)
-name_unique_hash(orcid text, last_name text, first_name text) +name_unique_hash(first_name text, last_name text, orcid text)
populate_record(anyelement, gcis_metadata.hstore) @@ -1091,7 +1079,7 @@
-2018-02-27 +2017-08-14 diff --git a/db/dist/docs/html/func_gcis_metadata.ghstore_consistent(internal, gcis_metadata.hstore, smallint, oid, internal).html b/db/dist/docs/html/func_gcis_metadata.ghstore_consistent(internal, gcis_metadata.hstore, smallint, oid, internal).html deleted file mode 100644 index d580f90d..00000000 --- a/db/dist/docs/html/func_gcis_metadata.ghstore_consistent(internal, gcis_metadata.hstore, smallint, oid, internal).html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Index for - - - - - - - - - - - -

Function: - ghstore_consistent(internal, gcis_metadata.hstore, smallint, oid, internal) -

-

Returns: boolean

-

Language: C

- -
ghstore_consistent
- - - - diff --git a/db/dist/docs/html/func_gcis_metadata.ghstore_same(gcis_metadata.ghstore, gcis_metadata.ghstore, internal).html b/db/dist/docs/html/func_gcis_metadata.ghstore_same(gcis_metadata.ghstore, gcis_metadata.ghstore, internal).html deleted file mode 100644 index 7b32d945..00000000 --- a/db/dist/docs/html/func_gcis_metadata.ghstore_same(gcis_metadata.ghstore, gcis_metadata.ghstore, internal).html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Index for - - - - - - - - - - - -

Function: - ghstore_same(gcis_metadata.ghstore, gcis_metadata.ghstore, internal) -

-

Returns: internal

-

Language: C

- -
ghstore_same
- - - - diff --git a/db/dist/docs/html/func_gcis_metadata.ghstore_union(internal, internal).html b/db/dist/docs/html/func_gcis_metadata.ghstore_union(internal, internal).html index 6faf7135..8888c6bd 100644 --- a/db/dist/docs/html/func_gcis_metadata.ghstore_union(internal, internal).html +++ b/db/dist/docs/html/func_gcis_metadata.ghstore_union(internal, internal).html @@ -117,7 +117,7 @@

Function: ghstore_union(internal, internal)

-

Returns: ghstore

+

Returns: internal

Language: C

ghstore_union
diff --git a/db/dist/docs/html/func_gcis_metadata.gin_consistent_hstore(internal, smallint, gcis_metadata.hstore, integer, internal, internal).html b/db/dist/docs/html/func_gcis_metadata.gin_consistent_hstore(internal, smallint, gcis_metadata.hstore, integer, internal, internal).html deleted file mode 100644 index 6dffdf9f..00000000 --- a/db/dist/docs/html/func_gcis_metadata.gin_consistent_hstore(internal, smallint, gcis_metadata.hstore, integer, internal, internal).html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Index for - - - - - - - - - - - -

Function: - gin_consistent_hstore(internal, smallint, gcis_metadata.hstore, integer, internal, internal) -

-

Returns: boolean

-

Language: C

- -
gin_consistent_hstore
- - - - diff --git a/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore(gcis_metadata.hstore, internal).html b/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore(gcis_metadata.hstore, internal).html deleted file mode 100644 index 9076cb28..00000000 --- a/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore(gcis_metadata.hstore, internal).html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Index for - - - - - - - - - - - -

Function: - gin_extract_hstore(gcis_metadata.hstore, internal) -

-

Returns: internal

-

Language: C

- -
gin_extract_hstore
- - - - diff --git a/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore_query(gcis_metadata.hstore, internal, smallint, internal, internal).html b/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore_query(gcis_metadata.hstore, internal, smallint, internal, internal).html deleted file mode 100644 index c8bc1762..00000000 --- a/db/dist/docs/html/func_gcis_metadata.gin_extract_hstore_query(gcis_metadata.hstore, internal, smallint, internal, internal).html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Index for - - - - - - - - - - - -

Function: - gin_extract_hstore_query(gcis_metadata.hstore, internal, smallint, internal, internal) -

-

Returns: internal

-

Language: C

- -
gin_extract_hstore_query
- - - - diff --git a/db/dist/docs/html/view_gcis_metadata.vw_gcmd_keyword.html b/db/dist/docs/html/view_gcis_metadata.vw_gcmd_keyword.html index 8929829a..0630edc6 100644 --- a/db/dist/docs/html/view_gcis_metadata.vw_gcmd_keyword.html +++ b/db/dist/docs/html/view_gcis_metadata.vw_gcmd_keyword.html @@ -274,233 +274,317 @@

View:
-SELECT COALESCE
-(level4.identifier
-     , level3.identifier
-     , level2.identifier
-     , level1.identifier
-     , term.identifier
-     , topic.identifier
-     , category.identifier
-) AS identifier
-,
-    category.label AS category
-,
-    topic.label AS topic
-,
-    term.label AS term
-,
-    level1.label AS level1
-,
-    level2.label AS level2
-,
-    level3.label AS level3
-,
-    level4.label AS level4
-   
-FROM (
+(
      (
            (
                  (
                        (
+                        SELECT COALESCE
+                             (level4.identifier
+                                   , level3.identifier
+                                   , level2.identifier
+                                   , level1.identifier
+                                   , term.identifier
+                                   , topic.identifier
+                                   , category.identifier
+                             ) AS identifier
+                             , category.label AS category
+                             , topic.label AS topic
+                             , term.label AS term
+                             , level1.label AS level1
+                             , level2.label AS level2
+                             , level3.label AS level3
+                             , level4.label AS level4 
+                          FROM (
+                                   (
+                                         (
+                                               (
+                                                     (
+                                                           (
+                                                                 (gcmd_keyword wrapper 
+                                                                    JOIN gcmd_keyword category 
+                                                                      ON (
+                                                                             (
+                                                                                   (category.parent_identifier)::text = 
+                                                                                   (wrapper.identifier)::text
+                                                                             )
+                                                                       )
+                                                                 )
+                                                              JOIN gcmd_keyword topic 
+                                                                ON (
+                                                                       (
+                                                                             (topic.parent_identifier)::text = 
+                                                                             (category.identifier)::text
+                                                                       )
+                                                                 )
+                                                           )
+                                                        JOIN gcmd_keyword term 
+                                                          ON (
+                                                                 (
+                                                                       (term.parent_identifier)::text = 
+                                                                       (topic.identifier)::text
+                                                                 )
+                                                           )
+                                                     )
+                                                  JOIN gcmd_keyword level1 
+                                                    ON (
+                                                           (
+                                                                 (level1.parent_identifier)::text = 
+                                                                 (term.identifier)::text
+                                                           )
+                                                     )
+                                               )
+                                            JOIN gcmd_keyword level2 
+                                              ON (
+                                                     (
+                                                           (level2.parent_identifier)::text = 
+                                                           (level1.identifier)::text
+                                                     )
+                                               )
+                                         )
+                                      JOIN gcmd_keyword level3 
+                                        ON (
+                                               (
+                                                     (level3.parent_identifier)::text = 
+                                                     (level2.identifier)::text
+                                               )
+                                         )
+                                   )
+                                JOIN gcmd_keyword level4 
+                                  ON (
+                                         (
+                                               (level4.parent_identifier)::text = 
+                                               (level3.identifier)::text
+                                         )
+                                   )
+                             )
+                         WHERE (
+                                   (
+                                         (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
+                                   )
+                                 AND (
+                                         (wrapper.label)::text = 'Science Keywords'::text
+                                   )
+                             )
+                         UNIONSELECT COALESCE
+                             (level3.identifier
+                                   , level2.identifier
+                                   , level1.identifier
+                                   , term.identifier
+                                   , topic.identifier
+                                   , category.identifier
+                             ) AS identifier
+                             , category.label AS category
+                             , topic.label AS topic
+                             , term.label AS term
+                             , level1.label AS level1
+                             , level2.label AS level2
+                             , level3.label AS level3
+                             , NULL::character varying AS level4 
+                          FROM (
+                                   (
+                                         (
+                                               (
+                                                     (
+                                                           (gcmd_keyword wrapper 
+                                                              JOIN gcmd_keyword category 
+                                                                ON (
+                                                                       (
+                                                                             (category.parent_identifier)::text = 
+                                                                             (wrapper.identifier)::text
+                                                                       )
+                                                                 )
+                                                           )
+                                                        JOIN gcmd_keyword topic 
+                                                          ON (
+                                                                 (
+                                                                       (topic.parent_identifier)::text = 
+                                                                       (category.identifier)::text
+                                                                 )
+                                                           )
+                                                     )
+                                                  JOIN gcmd_keyword term 
+                                                    ON (
+                                                           (
+                                                                 (term.parent_identifier)::text = 
+                                                                 (topic.identifier)::text
+                                                           )
+                                                     )
+                                               )
+                                            JOIN gcmd_keyword level1 
+                                              ON (
+                                                     (
+                                                           (level1.parent_identifier)::text = 
+                                                           (term.identifier)::text
+                                                     )
+                                               )
+                                         )
+                                      JOIN gcmd_keyword level2 
+                                        ON (
+                                               (
+                                                     (level2.parent_identifier)::text = 
+                                                     (level1.identifier)::text
+                                               )
+                                         )
+                                   )
+                                JOIN gcmd_keyword level3 
+                                  ON (
+                                         (
+                                               (level3.parent_identifier)::text = 
+                                               (level2.identifier)::text
+                                         )
+                                   )
+                             )
+                         WHERE (
+                                   (
+                                         (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
+                                   )
+                                 AND (
+                                         (wrapper.label)::text = 'Science Keywords'::text
+                                   )
+                             )
+                       )
+                   UNIONSELECT COALESCE
+                       (level2.identifier
+                             , level1.identifier
+                             , term.identifier
+                             , topic.identifier
+                             , category.identifier
+                       ) AS identifier
+                       , category.label AS category
+                       , topic.label AS topic
+                       , term.label AS term
+                       , level1.label AS level1
+                       , level2.label AS level2
+                       , NULL::character varying AS level3
+                       , NULL::character varying AS level4 
+                    FROM (
                              (
-                                   (gcmd_keyword wrapper
-     
-                                      JOIN gcmd_keyword category 
+                                   (
+                                         (
+                                               (gcmd_keyword wrapper 
+                                                  JOIN gcmd_keyword category 
+                                                    ON (
+                                                           (
+                                                                 (category.parent_identifier)::text = 
+                                                                 (wrapper.identifier)::text
+                                                           )
+                                                     )
+                                               )
+                                            JOIN gcmd_keyword topic 
+                                              ON (
+                                                     (
+                                                           (topic.parent_identifier)::text = 
+                                                           (category.identifier)::text
+                                                     )
+                                               )
+                                         )
+                                      JOIN gcmd_keyword term 
                                         ON (
                                                (
-                                                     (category.parent_identifier)::text = 
-                                                     (wrapper.identifier)::text
+                                                     (term.parent_identifier)::text = 
+                                                     (topic.identifier)::text
                                                )
                                          )
                                    )
-     
-                                JOIN gcmd_keyword topic 
+                                JOIN gcmd_keyword level1 
                                   ON (
                                          (
-                                               (topic.parent_identifier)::text = 
-                                               (category.identifier)::text
+                                               (level1.parent_identifier)::text = 
+                                               (term.identifier)::text
                                          )
                                    )
                              )
-     
-                          JOIN gcmd_keyword term 
+                          JOIN gcmd_keyword level2 
                             ON (
                                    (
-                                         (term.parent_identifier)::text = 
-                                         (topic.identifier)::text
+                                         (level2.parent_identifier)::text = 
+                                         (level1.identifier)::text
                                    )
                              )
                        )
-     
-                    JOIN gcmd_keyword level1 
-                      ON (
+                   WHERE (
                              (
-                                   (level1.parent_identifier)::text = 
-                                   (term.identifier)::text
+                                   (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
+                             )
+                           AND (
+                                   (wrapper.label)::text = 'Science Keywords'::text
                              )
                        )
                  )
-     
-              JOIN gcmd_keyword level2 
-                ON (
+             UNIONSELECT COALESCE
+                 (level1.identifier
+                       , term.identifier
+                       , topic.identifier
+                       , category.identifier
+                 ) AS identifier
+                 , category.label AS category
+                 , topic.label AS topic
+                 , term.label AS term
+                 , level1.label AS level1
+                 , NULL::character varying AS level2
+                 , NULL::character varying AS level3
+                 , NULL::character varying AS level4 
+              FROM (
                        (
-                             (level2.parent_identifier)::text = 
-                             (level1.identifier)::text
-                       )
-                 )
-           )
-     
-        JOIN gcmd_keyword level3 
-          ON (
-                 (
-                       (level3.parent_identifier)::text = 
-                       (level2.identifier)::text
-                 )
-           )
-     )
-     
-  JOIN gcmd_keyword level4 
-    ON (
-           (
-                 (level4.parent_identifier)::text = 
-                 (level3.identifier)::text
-           )
-     )
-)
-  
-WHERE (
-     (
-           (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
-     )
-   AND (
-           (wrapper.label)::text = 'Science Keywords'::text
-     )
-)
-UNION
- 
-SELECT COALESCE
-(level3.identifier
-     , level2.identifier
-     , level1.identifier
-     , term.identifier
-     , topic.identifier
-     , category.identifier
-) AS identifier
-,
-    category.label AS category
-,
-    topic.label AS topic
-,
-    term.label AS term
-,
-    level1.label AS level1
-,
-    level2.label AS level2
-,
-    level3.label AS level3
-,
-    NULL::character varying AS level4
-   
-FROM (
-     (
-           (
-                 (
-                       (
-                             (gcmd_keyword wrapper
-     
-                                JOIN gcmd_keyword category 
+                             (
+                                   (gcmd_keyword wrapper 
+                                      JOIN gcmd_keyword category 
+                                        ON (
+                                               (
+                                                     (category.parent_identifier)::text = 
+                                                     (wrapper.identifier)::text
+                                               )
+                                         )
+                                   )
+                                JOIN gcmd_keyword topic 
                                   ON (
                                          (
-                                               (category.parent_identifier)::text = 
-                                               (wrapper.identifier)::text
+                                               (topic.parent_identifier)::text = 
+                                               (category.identifier)::text
                                          )
                                    )
                              )
-     
-                          JOIN gcmd_keyword topic 
+                          JOIN gcmd_keyword term 
                             ON (
                                    (
-                                         (topic.parent_identifier)::text = 
-                                         (category.identifier)::text
+                                         (term.parent_identifier)::text = 
+                                         (topic.identifier)::text
                                    )
                              )
                        )
-     
-                    JOIN gcmd_keyword term 
+                    JOIN gcmd_keyword level1 
                       ON (
                              (
-                                   (term.parent_identifier)::text = 
-                                   (topic.identifier)::text
+                                   (level1.parent_identifier)::text = 
+                                   (term.identifier)::text
                              )
                        )
                  )
-     
-              JOIN gcmd_keyword level1 
-                ON (
+             WHERE (
                        (
-                             (level1.parent_identifier)::text = 
-                             (term.identifier)::text
+                             (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
+                       )
+                     AND (
+                             (wrapper.label)::text = 'Science Keywords'::text
                        )
                  )
            )
-     
-        JOIN gcmd_keyword level2 
-          ON (
+       UNIONSELECT COALESCE
+           (term.identifier
+                 , topic.identifier
+                 , category.identifier
+           ) AS identifier
+           , category.label AS category
+           , topic.label AS topic
+           , term.label AS term
+           , NULL::character varying AS level1
+           , NULL::character varying AS level2
+           , NULL::character varying AS level3
+           , NULL::character varying AS level4 
+        FROM (
                  (
-                       (level2.parent_identifier)::text = 
-                       (level1.identifier)::text
-                 )
-           )
-     )
-     
-  JOIN gcmd_keyword level3 
-    ON (
-           (
-                 (level3.parent_identifier)::text = 
-                 (level2.identifier)::text
-           )
-     )
-)
-  
-WHERE (
-     (
-           (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text
-     )
-   AND (
-           (wrapper.label)::text = 'Science Keywords'::text
-     )
-)
-UNION
- 
-SELECT COALESCE
-(level2.identifier
-     , level1.identifier
-     , term.identifier
-     , topic.identifier
-     , category.identifier
-) AS identifier
-,
-    category.label AS category
-,
-    topic.label AS topic
-,
-    term.label AS term
-,
-    level1.label AS level1
-,
-    level2.label AS level2
-,
-    NULL::character varying AS level3
-,
-    NULL::character varying AS level4
-   
-FROM (
-     (
-           (
-                 (
-                       (gcmd_keyword wrapper
-     
+                       (gcmd_keyword wrapper 
                           JOIN gcmd_keyword category 
                             ON (
                                    (
@@ -509,7 +593,6 @@ 

View: ) ) ) - JOIN gcmd_keyword topic ON ( ( @@ -518,7 +601,6 @@

View: ) ) ) - JOIN gcmd_keyword term ON ( ( @@ -527,131 +609,28 @@

View: ) ) ) - - JOIN gcmd_keyword level1 - ON ( + WHERE ( ( - (level1.parent_identifier)::text = - (term.identifier)::text - ) - ) - ) - - JOIN gcmd_keyword level2 - ON ( - ( - (level2.parent_identifier)::text = - (level1.identifier)::text - ) - ) -) - -WHERE ( - ( - (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text - ) - AND ( - (wrapper.label)::text = 'Science Keywords'::text - ) -) -UNION - -SELECT COALESCE -(level1.identifier - , term.identifier - , topic.identifier - , category.identifier -) AS identifier -, - category.label AS category -, - topic.label AS topic -, - term.label AS term -, - level1.label AS level1 -, - NULL::character varying AS level2 -, - NULL::character varying AS level3 -, - NULL::character varying AS level4 - -FROM ( - ( - ( - (gcmd_keyword wrapper - - JOIN gcmd_keyword category - ON ( - ( - (category.parent_identifier)::text = - (wrapper.identifier)::text - ) - ) + (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text ) - - JOIN gcmd_keyword topic - ON ( - ( - (topic.parent_identifier)::text = - (category.identifier)::text - ) + AND ( + (wrapper.label)::text = 'Science Keywords'::text ) ) - - JOIN gcmd_keyword term - ON ( - ( - (term.parent_identifier)::text = - (topic.identifier)::text - ) - ) - ) - - JOIN gcmd_keyword level1 - ON ( - ( - (level1.parent_identifier)::text = - (term.identifier)::text - ) ) -) - -WHERE ( - ( - (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text - ) - AND ( - (wrapper.label)::text = 'Science Keywords'::text - ) -) -UNION - -SELECT COALESCE -(term.identifier - , topic.identifier - , category.identifier -) AS identifier -, - category.label AS category -, - topic.label AS topic -, - term.label AS term -, - NULL::character varying AS level1 -, - NULL::character varying AS level2 -, - NULL::character varying AS level3 -, - NULL::character varying AS level4 - -FROM ( - ( - (gcmd_keyword wrapper - + UNIONSELECT COALESCE + (topic.identifier + , category.identifier + ) AS identifier + , category.label AS category + , topic.label AS topic + , NULL::character varying AS term + , NULL::character varying AS level1 + , NULL::character varying AS level2 + , NULL::character varying AS level3 + , NULL::character varying AS level4 + FROM ( + (gcmd_keyword wrapper JOIN gcmd_keyword category ON ( ( @@ -660,7 +639,6 @@

View: ) ) ) - JOIN gcmd_keyword topic ON ( ( @@ -669,95 +647,25 @@

View: ) ) ) - - JOIN gcmd_keyword term - ON ( + WHERE ( ( - (term.parent_identifier)::text = - (topic.identifier)::text + (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text ) - ) -) - -WHERE ( - ( - (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text - ) - AND ( - (wrapper.label)::text = 'Science Keywords'::text - ) -) -UNION - -SELECT COALESCE -(topic.identifier - , category.identifier -) AS identifier -, - category.label AS category -, - topic.label AS topic -, - NULL::character varying AS term -, - NULL::character varying AS level1 -, - NULL::character varying AS level2 -, - NULL::character varying AS level3 -, - NULL::character varying AS level4 - -FROM ( - (gcmd_keyword wrapper - - JOIN gcmd_keyword category - ON ( - ( - (category.parent_identifier)::text = - (wrapper.identifier)::text - ) + AND ( + (wrapper.label)::text = 'Science Keywords'::text ) ) - - JOIN gcmd_keyword topic - ON ( - ( - (topic.parent_identifier)::text = - (category.identifier)::text - ) - ) -) - -WHERE ( - ( - (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text - ) - AND ( - (wrapper.label)::text = 'Science Keywords'::text - ) ) -UNION - -SELECT COALESCE +UNIONSELECT COALESCE (category.identifier) AS identifier -, - category.label AS category -, - NULL::character varying AS topic -, - NULL::character varying AS term -, - NULL::character varying AS level1 -, - NULL::character varying AS level2 -, - NULL::character varying AS level3 -, - NULL::character varying AS level4 - -FROM (gcmd_keyword wrapper - +, category.label AS category +, NULL::character varying AS topic +, NULL::character varying AS term +, NULL::character varying AS level1 +, NULL::character varying AS level2 +, NULL::character varying AS level3 +, NULL::character varying AS level4 +FROM (gcmd_keyword wrapper JOIN gcmd_keyword category ON ( ( @@ -766,7 +674,6 @@

View: ) ) ) - WHERE ( ( (wrapper.identifier)::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text diff --git a/db/dist/docs/pod/table__report_editor.pod b/db/dist/docs/pod/table__report_editor.pod index 23e9fbf3..764b0199 100644 --- a/db/dist/docs/pod/table__report_editor.pod +++ b/db/dist/docs/pod/table__report_editor.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME _report_editor -=head1 DESCRIPTION +\=head1 DESCRIPTION Users who have permissions to make changes to a given report. -=head1 FIELDS +\=head1 FIELDS report (character varying) - The identifier of the report. username (character varying) - The name of the user. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata._report_editor" Column | Type | Modifiers | Storage | Stats target | Description @@ -24,8 +24,9 @@ Users who have permissions to make changes to a given report. "_report_editor_pkey" PRIMARY KEY, btree (report, username) Foreign-key constraints: "_report_editor_report_fkey" FOREIGN KEY (report) REFERENCES report(identifier) ON UPDATE CASCADE ON DELETE CASCADE + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table__report_viewer.pod b/db/dist/docs/pod/table__report_viewer.pod index 52c2eb9e..e22eebd0 100644 --- a/db/dist/docs/pod/table__report_viewer.pod +++ b/db/dist/docs/pod/table__report_viewer.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME _report_viewer -=head1 DESCRIPTION +\=head1 DESCRIPTION Users who have permission to view non-public reports. -=head1 FIELDS +\=head1 FIELDS report (character varying) - The identifier of the report. username (character varying) - The name of the user. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata._report_viewer" Column | Type | Modifiers | Storage | Stats target | Description @@ -24,8 +24,9 @@ Users who have permission to view non-public reports. "_report_viewer_pkey" PRIMARY KEY, btree (report, username) Foreign-key constraints: "_report_viewer_report_fkey" FOREIGN KEY (report) REFERENCES report(identifier) ON UPDATE CASCADE ON DELETE CASCADE + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_activity.pod b/db/dist/docs/pod/table_activity.pod index 4459b32c..40b7f5de 100644 --- a/db/dist/docs/pod/table_activity.pod +++ b/db/dist/docs/pod/table_activity.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME activity -=head1 DESCRIPTION +\=head1 DESCRIPTION An activity is a process that occurs over a period of time, and may be associated with a pair of publications. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally unique identifier for this activity. data_usage (character varying) - A description of the way in which input data were used for this activity. @@ -22,7 +22,7 @@ An activity is a process that occurs over a period of time, and may be associate notes (character varying) - Other information about this activity which might be useful for traceability or reproducability. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.activity" Column | Type | Modifiers | Storage | Stats target | Description @@ -50,8 +50,9 @@ An activity is a process that occurs over a period of time, and may be associate Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON activity FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON activity FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_array.pod b/db/dist/docs/pod/table_array.pod index 90ed63dc..3cde0fa8 100644 --- a/db/dist/docs/pod/table_array.pod +++ b/db/dist/docs/pod/table_array.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME array -=head1 DESCRIPTION +\=head1 DESCRIPTION An array is an n-dimensional grid of data, and may be associated with a table. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally unique identifier for this array, such as a UUID. rows_in_header (integer) - The number of rows in the header of this array. rows (character varying[]) - The data in this array. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.array" Column | Type | Modifiers | Storage | Stats target | Description @@ -34,8 +34,9 @@ An array is an n-dimensional grid of data, and may be associated with a table. audit_trigger_stm AFTER TRUNCATE ON "array" FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON "array" FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON "array" FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_array_table_map.pod b/db/dist/docs/pod/table_array_table_map.pod index 21bcf59e..07e35e54 100644 --- a/db/dist/docs/pod/table_array_table_map.pod +++ b/db/dist/docs/pod/table_array_table_map.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME array_table_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Arrays and tables have a many-to-many relationship. -=head1 FIELDS +\=head1 FIELDS array_identifier (character varying) - The array. table_identifier (character varying) - The table. report_identifier (character varying) - The report associated with the table. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.array_table_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -30,8 +30,9 @@ Arrays and tables have a many-to-many relationship. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON array_table_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON array_table_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_article.pod b/db/dist/docs/pod/table_article.pod index a1a96cf8..a5082ef2 100644 --- a/db/dist/docs/pod/table_article.pod +++ b/db/dist/docs/pod/table_article.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME article -=head1 DESCRIPTION +\=head1 DESCRIPTION Articles are publications in peer reviewed journals, and generally have DOIs. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - The identifier : this should be the DOI, if there is one. title (character varying) - The title of the article (source: crossref.org). @@ -20,7 +20,7 @@ Articles are publications in peer reviewed journals, and generally have DOIs. notes (character varying) - Notes about this entry. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.article" Column | Type | Modifiers | Storage | Stats target | Description @@ -47,8 +47,9 @@ Articles are publications in peer reviewed journals, and generally have DOIs. audit_trigger_stm AFTER TRUNCATE ON article FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON article FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON article FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_book.pod b/db/dist/docs/pod/table_book.pod index 21b92f1e..96b636a6 100644 --- a/db/dist/docs/pod/table_book.pod +++ b/db/dist/docs/pod/table_book.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME book -=head1 DESCRIPTION +\=head1 DESCRIPTION Entries in this table are publications classified as books. They should have ISBN numbers. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally unique identifier for this book. title (character varying) - The title of the book @@ -20,7 +20,7 @@ Entries in this table are publications classified as books. They should have IS topic (character varying) - A brief free form comma-separated list of topics associated with this book. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.book" Column | Type | Modifiers | Storage | Stats target | Description @@ -44,8 +44,9 @@ Entries in this table are publications classified as books. They should have IS audit_trigger_stm AFTER TRUNCATE ON book FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON book FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON book FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_chapter.pod b/db/dist/docs/pod/table_chapter.pod index 054cb5d6..9ecc2362 100644 --- a/db/dist/docs/pod/table_chapter.pod +++ b/db/dist/docs/pod/table_chapter.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME chapter -=head1 DESCRIPTION +\=head1 DESCRIPTION A chapter is part of a report. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this chapter title (character varying) - The title. @@ -18,7 +18,7 @@ A chapter is part of a report. doi (character varying) - A digital object identifier for this chapter. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.chapter" Column | Type | Modifiers | Storage | Stats target | Description @@ -46,8 +46,9 @@ A chapter is part of a report. audit_trigger_stm AFTER TRUNCATE ON chapter FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON chapter FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON chapter FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text OR new.report_identifier::text <> old.report_identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_contributor.pod b/db/dist/docs/pod/table_contributor.pod index bd57a563..4fb2a1b7 100644 --- a/db/dist/docs/pod/table_contributor.pod +++ b/db/dist/docs/pod/table_contributor.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME contributor -=head1 DESCRIPTION +\=head1 DESCRIPTION A contributor is an organization, a role, and optionally a person. -=head1 FIELDS +\=head1 FIELDS id (serial) - An opaque numeric identifier for this contributor. person_id (integer) - The person (optional). @@ -15,7 +15,7 @@ A contributor is an organization, a role, and optionally a person. organization_identifier (character varying) - The organization. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.contributor" Column | Type | Modifiers | Storage | Stats target | Description @@ -38,8 +38,9 @@ A contributor is an organization, a role, and optionally a person. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON contributor FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON contributor FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_country.pod b/db/dist/docs/pod/table_country.pod index 888a23c5..26814b53 100644 --- a/db/dist/docs/pod/table_country.pod +++ b/db/dist/docs/pod/table_country.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME country -=head1 DESCRIPTION +\=head1 DESCRIPTION A list of countries used in GCIS. -=head1 FIELDS +\=head1 FIELDS code (character varying(2)) - Two letter code (ISO 3166-1 alpha-2) name (character varying) - Country name. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.country" Column | Type | Modifiers | Storage | Stats target | Description @@ -24,8 +24,9 @@ A list of countries used in GCIS. "country_pkey" PRIMARY KEY, btree (code) Referenced by: TABLE "organization" CONSTRAINT "fk_org_country" FOREIGN KEY (country_code) REFERENCES country(code) + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_dataset.pod b/db/dist/docs/pod/table_dataset.pod index 125bde15..b6853aa0 100644 --- a/db/dist/docs/pod/table_dataset.pod +++ b/db/dist/docs/pod/table_dataset.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME dataset -=head1 DESCRIPTION +\=head1 DESCRIPTION Datasets are arbitrary collections of data. They are a type of publication and may be associated with other publications. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally unique identifier for this dataset. This may be a composite identifier derived from external identifier or publications associated with this dataset. name (character varying) - A brief descriptive name. @@ -42,7 +42,7 @@ Datasets are arbitrary collections of data. They are a type of publication and temporal_resolution (character varying) - The temporal resolution (daily, monthly, etc.). -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.dataset" Column | Type | Modifiers | Storage | Stats target | Description @@ -93,8 +93,9 @@ Datasets are arbitrary collections of data. They are a type of publication and delpub BEFORE DELETE ON dataset FOR EACH ROW EXECUTE PROCEDURE delete_publication() update_exterms BEFORE UPDATE ON dataset FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_exterms('/dataset/') updatepub BEFORE UPDATE ON dataset FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_exterm.pod b/db/dist/docs/pod/table_exterm.pod index 9b0d847e..ea06662e 100644 --- a/db/dist/docs/pod/table_exterm.pod +++ b/db/dist/docs/pod/table_exterm.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME exterm -=head1 DESCRIPTION +\=head1 DESCRIPTION External terms which can be mapped to GCIS identifiers. -=head1 FIELDS +\=head1 FIELDS term (character varying) - The term itself. context (character varying) - A brief identifier for the context of this term. @@ -15,7 +15,7 @@ External terms which can be mapped to GCIS identifiers. gcid (character varying) - The GCIS identifier (URI) to which this term is mapped. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.exterm" Column | Type | Modifiers | Storage | Stats target | Description @@ -35,8 +35,9 @@ External terms which can be mapped to GCIS identifiers. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON exterm FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON exterm FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_figure.pod b/db/dist/docs/pod/table_figure.pod index 7d781e81..da12cb24 100644 --- a/db/dist/docs/pod/table_figure.pod +++ b/db/dist/docs/pod/table_figure.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME figure -=head1 DESCRIPTION +\=head1 DESCRIPTION A figure appears in a report and may consist of one or more images. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this figure. chapter_identifier (character varying) - The chapter in which this figure appears. @@ -30,7 +30,7 @@ A figure appears in a report and may consist of one or more images. _origination (json) - origination metadata collected by TSU, should eventually be mapped to an Activity -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.figure" Column | Type | Modifiers | Storage | Stats target | Description @@ -70,8 +70,9 @@ A figure appears in a report and may consist of one or more images. audit_trigger_stm AFTER TRUNCATE ON figure FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON figure FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON figure FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text OR new.report_identifier::text <> old.report_identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_file.pod b/db/dist/docs/pod/table_file.pod index 7fe5a699..37d5a9a4 100644 --- a/db/dist/docs/pod/table_file.pod +++ b/db/dist/docs/pod/table_file.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME file -=head1 DESCRIPTION +\=head1 DESCRIPTION Files are distinct downloadable entities which may be associated with publications. -=head1 FIELDS +\=head1 FIELDS file (character varying) - The URI for this file (relative to /assets/ or to the location) identifier (character varying) - A globally unique identifier for this file (a UUID). @@ -19,7 +19,7 @@ Files are distinct downloadable entities which may be associated with publicatio landing_page (character varying) - A URL for the landing page for this file. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.file" Column | Type | Modifiers | Storage | Stats target | Description @@ -42,8 +42,9 @@ Files are distinct downloadable entities which may be associated with publicatio Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON file FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON file FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_finding.pod b/db/dist/docs/pod/table_finding.pod index 3dbc80c9..fe610ece 100644 --- a/db/dist/docs/pod/table_finding.pod +++ b/db/dist/docs/pod/table_finding.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME finding -=head1 DESCRIPTION +\=head1 DESCRIPTION A finding is associated with a report and optionally a chapter. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this finding. chapter_identifier (character varying) - The chapter containing this finding. @@ -21,7 +21,7 @@ A finding is associated with a report and optionally a chapter. url (character varying) - A URL for a landing page for this finding. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.finding" Column | Type | Modifiers | Storage | Stats target | Description @@ -50,8 +50,9 @@ A finding is associated with a report and optionally a chapter. audit_trigger_stm AFTER TRUNCATE ON finding FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON finding FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON finding FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text OR new.report_identifier::text <> old.report_identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_gcmd_keyword.pod b/db/dist/docs/pod/table_gcmd_keyword.pod index 7c487fc0..6ad779c3 100644 --- a/db/dist/docs/pod/table_gcmd_keyword.pod +++ b/db/dist/docs/pod/table_gcmd_keyword.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME gcmd_keyword -=head1 DESCRIPTION +\=head1 DESCRIPTION Keywords from the Global Change Master Directory . -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - The UUID for this keyword. parent_identifier (character varying) - The UUID for the parent keyword. @@ -15,7 +15,7 @@ Keywords from the Global Change Master Directory old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_image.pod b/db/dist/docs/pod/table_image.pod index 32ffceed..9507ad11 100644 --- a/db/dist/docs/pod/table_image.pod +++ b/db/dist/docs/pod/table_image.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME image -=head1 DESCRIPTION +\=head1 DESCRIPTION An image may be associated with multiple figures, may have provenance and other attributes distinct from that of a parent figure. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally unique identifier (UUID). position (character varying) - A description of where this image is within other figures. @@ -26,7 +26,7 @@ An image may be associated with multiple figures, may have provenance and other url (character varying) - A landing page for this image. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.image" Column | Type | Modifiers | Storage | Stats target | Description @@ -58,8 +58,9 @@ An image may be associated with multiple figures, may have provenance and other audit_trigger_stm AFTER TRUNCATE ON image FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON image FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON image FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_image_figure_map.pod b/db/dist/docs/pod/table_image_figure_map.pod index ff0b648b..c6d9d7ef 100644 --- a/db/dist/docs/pod/table_image_figure_map.pod +++ b/db/dist/docs/pod/table_image_figure_map.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME image_figure_map -=head1 DESCRIPTION +\=head1 DESCRIPTION A figure can have many images and vice versa. -=head1 FIELDS +\=head1 FIELDS image_identifier (character varying) - The image. figure_identifier (character varying) - The figure. report_identifier (character varying) - The report containing the figure. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.image_figure_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -30,8 +30,9 @@ A figure can have many images and vice versa. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON image_figure_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON image_figure_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_instrument.pod b/db/dist/docs/pod/table_instrument.pod index d3b2da49..d80dc9d6 100644 --- a/db/dist/docs/pod/table_instrument.pod +++ b/db/dist/docs/pod/table_instrument.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME instrument -=head1 DESCRIPTION +\=head1 DESCRIPTION An instrument is used for measurement. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this instrument. name (character varying) - A brief name for this instrument. @@ -15,7 +15,7 @@ An instrument is used for measurement. description_attribution (character varying) - A URL which contains the description of this instrument. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.instrument" Column | Type | Modifiers | Storage | Stats target | Description @@ -37,8 +37,9 @@ An instrument is used for measurement. delpub BEFORE DELETE ON instrument FOR EACH ROW EXECUTE PROCEDURE delete_publication() update_exterms BEFORE UPDATE ON instrument FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_exterms('/instrument/') updatepub BEFORE UPDATE ON instrument FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_instrument_instance.pod b/db/dist/docs/pod/table_instrument_instance.pod index bdb9a19e..c94a3580 100644 --- a/db/dist/docs/pod/table_instrument_instance.pod +++ b/db/dist/docs/pod/table_instrument_instance.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME instrument_instance -=head1 DESCRIPTION +\=head1 DESCRIPTION An instrument instance is the association of an instrument with a platform. -=head1 FIELDS +\=head1 FIELDS platform_identifier (character varying) - The platform. instrument_identifier (character varying) - The instrument. location (character varying) - The location of the instrument on the platform. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.instrument_instance" Column | Type | Modifiers | Storage | Stats target | Description @@ -32,8 +32,9 @@ An instrument instance is the association of an instrument with a platform. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON instrument_instance FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON instrument_instance FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_instrument_measurement.pod b/db/dist/docs/pod/table_instrument_measurement.pod index e1da3003..80778da4 100644 --- a/db/dist/docs/pod/table_instrument_measurement.pod +++ b/db/dist/docs/pod/table_instrument_measurement.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME instrument_measurement -=head1 DESCRIPTION +\=head1 DESCRIPTION An instrument measurement is a way of associating an instrument instance with a dataset. -=head1 FIELDS +\=head1 FIELDS platform_identifier (character varying) - The platform of the instrument. instrument_identifier (character varying) - The instrument. dataset_identifier (character varying) - The dataset. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.instrument_measurement" Column | Type | Modifiers | Storage | Stats target | Description @@ -32,8 +32,9 @@ An instrument measurement is a way of associating an instrument instance with a Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON instrument_measurement FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON instrument_measurement FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_journal.pod b/db/dist/docs/pod/table_journal.pod index 6e4d40b2..fe4f4ce6 100644 --- a/db/dist/docs/pod/table_journal.pod +++ b/db/dist/docs/pod/table_journal.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME journal -=head1 DESCRIPTION +\=head1 DESCRIPTION A journal is a peer reviewed publication which contains articles. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this journal. title (character varying) - The title of the journal (source: crossref.org) @@ -19,7 +19,7 @@ A journal is a peer reviewed publication which contains articles. online_issn (issn) - -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.journal" Column | Type | Modifiers | Storage | Stats target | Description @@ -46,8 +46,9 @@ A journal is a peer reviewed publication which contains articles. audit_trigger_stm AFTER TRUNCATE ON journal FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON journal FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON journal FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_lexicon.pod b/db/dist/docs/pod/table_lexicon.pod index c8caa0f3..b8644a52 100644 --- a/db/dist/docs/pod/table_lexicon.pod +++ b/db/dist/docs/pod/table_lexicon.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME lexicon -=head1 DESCRIPTION +\=head1 DESCRIPTION A lexicon is a list of terms which correspond to GCIS identifiers. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A brief descriptive identifier for this lexicon. description (character varying) - A description of the lexicon, possibly including the organization associated with it. url (character varying) - A url for further information. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.lexicon" Column | Type | Modifiers | Storage | Stats target | Description @@ -31,8 +31,9 @@ A lexicon is a list of terms which correspond to GCIS identifiers. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON lexicon FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON lexicon FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_methodology.pod b/db/dist/docs/pod/table_methodology.pod index e8733d8e..ec34af45 100644 --- a/db/dist/docs/pod/table_methodology.pod +++ b/db/dist/docs/pod/table_methodology.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME methodology -=head1 DESCRIPTION +\=head1 DESCRIPTION A methodology is a publication associated with an activity -=head1 FIELDS +\=head1 FIELDS activity_identifier (character varying) - The activity. publication_id (integer) - The publication. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.methodology" Column | Type | Modifiers | Storage | Stats target | Description @@ -28,8 +28,9 @@ A methodology is a publication associated with an activity Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON methodology FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON methodology FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_model.pod b/db/dist/docs/pod/table_model.pod index 58bcc4cd..5c10d4af 100644 --- a/db/dist/docs/pod/table_model.pod +++ b/db/dist/docs/pod/table_model.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME model -=head1 DESCRIPTION +\=head1 DESCRIPTION Models may be associated with scenarios, model runs, and projects. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A unique descriptive identifier. project_identifier (character varying) - A project associated with this model. @@ -19,7 +19,7 @@ Models may be associated with scenarios, model runs, and projects. description_attribution (character varying) - A URL containing the description of this model. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.model" Column | Type | Modifiers | Storage | Stats target | Description @@ -41,8 +41,9 @@ Models may be associated with scenarios, model runs, and projects. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON model FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON model FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_model_run.pod b/db/dist/docs/pod/table_model_run.pod index 4128b8e4..9edf6a6a 100644 --- a/db/dist/docs/pod/table_model_run.pod +++ b/db/dist/docs/pod/table_model_run.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME model_run -=head1 DESCRIPTION +\=head1 DESCRIPTION A model run associates a model with a scenario and a project. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A unique identifier for this model run. doi (character varying) - A digital object identifier. @@ -23,7 +23,7 @@ A model run associates a model with a scenario and a project. time_resolution (interval) - The temporal resolution of this run. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.model_run" Column | Type | Modifiers | Storage | Stats target | Description @@ -54,8 +54,9 @@ A model run associates a model with a scenario and a project. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON model_run FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON model_run FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_organization.pod b/db/dist/docs/pod/table_organization.pod index 061e5728..e0d91454 100644 --- a/db/dist/docs/pod/table_organization.pod +++ b/db/dist/docs/pod/table_organization.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME organization -=head1 DESCRIPTION +\=head1 DESCRIPTION An organization is an entity with which people and publications may be associated. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. name (character varying) - The organization as referred to in English. @@ -17,7 +17,7 @@ An organization is an entity with which people and publications may be associate international (boolean) - Flag indicating an multinational organization with HQs in multiple countries. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.organization" Column | Type | Modifiers | Storage | Stats target | Description @@ -45,8 +45,9 @@ An organization is an entity with which people and publications may be associate audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON organization FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON organization FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') update_exterms BEFORE UPDATE ON organization FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_exterms('/organization/') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_organization_alternate_name.pod b/db/dist/docs/pod/table_organization_alternate_name.pod index 37eb19ca..91674036 100644 --- a/db/dist/docs/pod/table_organization_alternate_name.pod +++ b/db/dist/docs/pod/table_organization_alternate_name.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME organization_alternate_name -=head1 DESCRIPTION +\=head1 DESCRIPTION Alternate names for organizations either multilingual or defunct -=head1 FIELDS +\=head1 FIELDS organization_identifier (character varying) - The organization identifier this name belongs to. alternate_name (text) - The alternate name of the organization. @@ -16,7 +16,7 @@ Alternate names for organizations either multilingual or defunct identifier (serial) - An automatically-generated unique numeric identifier. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.organization_alternate_name" Column | Type | Modifiers | Storage | Stats target | Description @@ -33,8 +33,9 @@ Alternate names for organizations either multilingual or defunct "iso_lang_length" CHECK (char_length(language::text) >= 2) Foreign-key constraints: "organization_alternate_name_organization_identifier_fkey" FOREIGN KEY (organization_identifier) REFERENCES organization(identifier) ON UPDATE CASCADE ON DELETE CASCADE + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_organization_map.pod b/db/dist/docs/pod/table_organization_map.pod index c611c9fd..93ec9a04 100644 --- a/db/dist/docs/pod/table_organization_map.pod +++ b/db/dist/docs/pod/table_organization_map.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME organization_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Organizations may be associated with other organizations. -=head1 FIELDS +\=head1 FIELDS organization_identifier (character varying) - The first organization. other_organization_identifier (character varying) - The target. organization_relationship_identifier (character varying) - The relationship. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.organization_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -31,8 +31,9 @@ Organizations may be associated with other organizations. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON organization_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON organization_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_organization_relationship.pod b/db/dist/docs/pod/table_organization_relationship.pod index 80b77500..eec2a792 100644 --- a/db/dist/docs/pod/table_organization_relationship.pod +++ b/db/dist/docs/pod/table_organization_relationship.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME organization_relationship -=head1 DESCRIPTION +\=head1 DESCRIPTION These are the possible ways in which two organizations may be related. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. label (character varying) - A human readable label. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.organization_relationship" Column | Type | Modifiers | Storage | Stats target | Description @@ -27,8 +27,9 @@ These are the possible ways in which two organizations may be related. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON organization_relationship FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON organization_relationship FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_organization_type.pod b/db/dist/docs/pod/table_organization_type.pod index 33f055ba..f0808fd2 100644 --- a/db/dist/docs/pod/table_organization_type.pod +++ b/db/dist/docs/pod/table_organization_type.pod @@ -1,18 +1,18 @@ -=head1 NAME +\=head1 NAME organization_type -=head1 DESCRIPTION +\=head1 DESCRIPTION The distinct types of organizations represented. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.organization_type" Column | Type | Modifiers | Storage | Stats target | Description @@ -25,8 +25,9 @@ The distinct types of organizations represented. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON organization_type FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON organization_type FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_person.pod b/db/dist/docs/pod/table_person.pod index 84a134f4..9f627d37 100644 --- a/db/dist/docs/pod/table_person.pod +++ b/db/dist/docs/pod/table_person.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME person -=head1 DESCRIPTION +\=head1 DESCRIPTION People are stored using opaque numeric identifiers. -=head1 FIELDS +\=head1 FIELDS id (serial) - A unique numeric identifier. url (character varying) - A URL with information about this person. @@ -17,7 +17,7 @@ People are stored using opaque numeric identifiers. middle_name (character varying) - The middle name of the person. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.person" Column | Type | Modifiers | Storage | Stats target | Description @@ -41,8 +41,9 @@ People are stored using opaque numeric identifiers. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON person FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON person FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_platform.pod b/db/dist/docs/pod/table_platform.pod index 68e36bf1..091d1009 100644 --- a/db/dist/docs/pod/table_platform.pod +++ b/db/dist/docs/pod/table_platform.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME platform -=head1 DESCRIPTION +\=head1 DESCRIPTION A platform may be associated with one more more instruments. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this platform. name (character varying) - A brief name. @@ -19,7 +19,7 @@ A platform may be associated with one more more instruments. end_date (timestamp without time zone) - The date on which this platform ceased operations. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.platform" Column | Type | Modifiers | Storage | Stats target | Description @@ -47,8 +47,9 @@ A platform may be associated with one more more instruments. delpub BEFORE DELETE ON platform FOR EACH ROW EXECUTE PROCEDURE delete_publication() update_exterms BEFORE UPDATE ON platform FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_exterms('/platform/') updatepub BEFORE UPDATE ON platform FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_platform_type.pod b/db/dist/docs/pod/table_platform_type.pod index c5e9be51..946602e4 100644 --- a/db/dist/docs/pod/table_platform_type.pod +++ b/db/dist/docs/pod/table_platform_type.pod @@ -1,18 +1,18 @@ -=head1 NAME +\=head1 NAME platform_type -=head1 DESCRIPTION +\=head1 DESCRIPTION Platforms have a type. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier for this type. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.platform_type" Column | Type | Modifiers | Storage | Stats target | Description @@ -22,8 +22,9 @@ Platforms have a type. "platform_type_pkey" PRIMARY KEY, btree (identifier) Referenced by: TABLE "platform" CONSTRAINT "platform_platform_type_identifier_fkey" FOREIGN KEY (platform_type_identifier) REFERENCES platform_type(identifier) + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_project.pod b/db/dist/docs/pod/table_project.pod index f6443082..9e787035 100644 --- a/db/dist/docs/pod/table_project.pod +++ b/db/dist/docs/pod/table_project.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME project -=head1 DESCRIPTION +\=head1 DESCRIPTION A project may be associated with a collection of models. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. name (character varying) - A short name. @@ -16,7 +16,7 @@ A project may be associated with a collection of models. website (character varying) - A website officially assocaited with this project. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.project" Column | Type | Modifiers | Storage | Stats target | Description @@ -34,8 +34,9 @@ A project may be associated with a collection of models. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON project FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON project FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication.pod b/db/dist/docs/pod/table_publication.pod index 97d38f71..ade5aba6 100644 --- a/db/dist/docs/pod/table_publication.pod +++ b/db/dist/docs/pod/table_publication.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME publication -=head1 DESCRIPTION +\=head1 DESCRIPTION A publication, similar to an entity, is a generic term for something that has been released to the public. -=head1 FIELDS +\=head1 FIELDS id (serial) - An opaque numeric identifier publication_type_identifier (character varying) - The type fk (hstore) - Column column names and values of the primary key of this entitiy in its native table. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication" Column | Type | Modifiers | Storage | Stats target | Description @@ -40,8 +40,9 @@ A publication, similar to an entity, is a generic term for something that has be Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_contributor_map.pod b/db/dist/docs/pod/table_publication_contributor_map.pod index 6649b347..f77e5473 100644 --- a/db/dist/docs/pod/table_publication_contributor_map.pod +++ b/db/dist/docs/pod/table_publication_contributor_map.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME publication_contributor_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications can have one more contributors. -=head1 FIELDS +\=head1 FIELDS publication_id (integer) - The publication. contributor_id (integer) - The contributor. @@ -15,7 +15,7 @@ Publications can have one more contributors. sort_key (integer) - A sort key for this entry. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_contributor_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -33,8 +33,9 @@ Publications can have one more contributors. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_contributor_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_contributor_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_file_map.pod b/db/dist/docs/pod/table_publication_file_map.pod index cfe47d44..d9e4ad8c 100644 --- a/db/dist/docs/pod/table_publication_file_map.pod +++ b/db/dist/docs/pod/table_publication_file_map.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME publication_file_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications may have zero or more files. And vice versa. -=head1 FIELDS +\=head1 FIELDS publication_id (integer) - A publication. file_identifier (character varying) - A file. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_file_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -28,8 +28,9 @@ Publications may have zero or more files. And vice versa. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_file_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_file_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_gcmd_keyword_map.pod b/db/dist/docs/pod/table_publication_gcmd_keyword_map.pod index d868a07a..e80b2826 100644 --- a/db/dist/docs/pod/table_publication_gcmd_keyword_map.pod +++ b/db/dist/docs/pod/table_publication_gcmd_keyword_map.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME publication_gcmd_keyword_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications can have zero or more keywords. And vice versa. -=head1 FIELDS +\=head1 FIELDS publication_id (integer) - A publication. gcmd_keyword_identifier (character varying) - A keyword. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_gcmd_keyword_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -25,8 +25,9 @@ Publications can have zero or more keywords. And vice versa. Foreign-key constraints: "publication_gcmd_keyword_map_gcmd_keyword_identifier_fkey" FOREIGN KEY (gcmd_keyword_identifier) REFERENCES gcmd_keyword(identifier) ON UPDATE CASCADE ON DELETE CASCADE "publication_gcmd_keyword_map_publication_id_fkey" FOREIGN KEY (publication_id) REFERENCES publication(id) ON UPDATE CASCADE ON DELETE CASCADE + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_map.pod b/db/dist/docs/pod/table_publication_map.pod index e6a309ed..bc58ee4f 100644 --- a/db/dist/docs/pod/table_publication_map.pod +++ b/db/dist/docs/pod/table_publication_map.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME publication_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications can be related to other publications. -=head1 FIELDS +\=head1 FIELDS child (integer) - The child publication. relationship (character varying) - The relationship, in the form ontology:term. @@ -16,7 +16,7 @@ Publications can be related to other publications. activity_identifier (character varying) - XXX -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -35,8 +35,9 @@ Publications can be related to other publications. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_reference_map.pod b/db/dist/docs/pod/table_publication_reference_map.pod index 1f2f4107..4d35a29f 100644 --- a/db/dist/docs/pod/table_publication_reference_map.pod +++ b/db/dist/docs/pod/table_publication_reference_map.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME publication_reference_map -=head1 DESCRIPTION +\=head1 DESCRIPTION A map from publications to references. -=head1 FIELDS +\=head1 FIELDS publication_id (integer) - The publication. reference_identifier (character varying) - The reference. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_reference_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -28,8 +28,9 @@ A map from publications to references. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_reference_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_reference_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_region_map.pod b/db/dist/docs/pod/table_publication_region_map.pod index 550dc44d..0c02512a 100644 --- a/db/dist/docs/pod/table_publication_region_map.pod +++ b/db/dist/docs/pod/table_publication_region_map.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME publication_region_map -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications can have many regions and vice versa. -=head1 FIELDS +\=head1 FIELDS publication_id (integer) - A publication. region_identifier (character varying) - A region. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_region_map" Column | Type | Modifiers | Storage | Stats target | Description @@ -28,8 +28,9 @@ Publications can have many regions and vice versa. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_region_map FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_region_map FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_publication_type.pod b/db/dist/docs/pod/table_publication_type.pod index 74dd4f37..177f672d 100644 --- a/db/dist/docs/pod/table_publication_type.pod +++ b/db/dist/docs/pod/table_publication_type.pod @@ -1,19 +1,19 @@ -=head1 NAME +\=head1 NAME publication_type -=head1 DESCRIPTION +\=head1 DESCRIPTION Publications have types which correspond to database tables. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive type. table (character varying) - The database table. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.publication_type" Column | Type | Modifiers | Storage | Stats target | Description @@ -27,8 +27,9 @@ Publications have types which correspond to database tables. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON publication_type FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON publication_type FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_reference.pod b/db/dist/docs/pod/table_reference.pod index 28e9d969..827cff1f 100644 --- a/db/dist/docs/pod/table_reference.pod +++ b/db/dist/docs/pod/table_reference.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME reference -=head1 DESCRIPTION +\=head1 DESCRIPTION A reference is a bibliographic entry. It relates two publications. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A unique identifier (a UUID). attrs (hstore) - Arbitrary name-value pairs for this reference. child_publication_id (integer) - The publication to which this reference refers. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.reference" Column | Type | Modifiers | Storage | Stats target | Description @@ -35,8 +35,9 @@ A reference is a bibliographic entry. It relates two publications. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON reference FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON reference FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_region.pod b/db/dist/docs/pod/table_region.pod index 9e35cb3c..e859e824 100644 --- a/db/dist/docs/pod/table_region.pod +++ b/db/dist/docs/pod/table_region.pod @@ -1,20 +1,20 @@ -=head1 NAME +\=head1 NAME region -=head1 DESCRIPTION +\=head1 DESCRIPTION A region is a geographical area. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. label (character varying) - A human readable label. description (character varying) - A description. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.region" Column | Type | Modifiers | Storage | Stats target | Description @@ -31,8 +31,9 @@ A region is a geographical area. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON region FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON region FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_report.pod b/db/dist/docs/pod/table_report.pod index 0b04afa8..7c743b72 100644 --- a/db/dist/docs/pod/table_report.pod +++ b/db/dist/docs/pod/table_report.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME report -=head1 DESCRIPTION +\=head1 DESCRIPTION A report is a publication that may have chapters, figures, findings, and tables. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. title (character varying) - The title. @@ -24,7 +24,7 @@ A report is a publication that may have chapters, figures, findings, and tables. contact_email (character varying) - A contact email address for this report. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.report" Column | Type | Modifiers | Storage | Stats target | Description @@ -64,8 +64,9 @@ A report is a publication that may have chapters, figures, findings, and tables. audit_trigger_stm AFTER TRUNCATE ON report FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON report FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON report FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_report_type.pod b/db/dist/docs/pod/table_report_type.pod index d9055307..0b8eaad2 100644 --- a/db/dist/docs/pod/table_report_type.pod +++ b/db/dist/docs/pod/table_report_type.pod @@ -1,18 +1,18 @@ -=head1 NAME +\=head1 NAME report_type -=head1 DESCRIPTION +\=head1 DESCRIPTION A list of report types. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifer. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.report_type" Column | Type | Modifiers | Storage | Stats target | Description @@ -22,8 +22,9 @@ A list of report types. "report_type_pkey" PRIMARY KEY, btree (identifier) Referenced by: TABLE "report" CONSTRAINT "report_report_type_identifier_fkey" FOREIGN KEY (report_type_identifier) REFERENCES report_type(identifier) + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_role_type.pod b/db/dist/docs/pod/table_role_type.pod index d9c86bdf..08efabf3 100644 --- a/db/dist/docs/pod/table_role_type.pod +++ b/db/dist/docs/pod/table_role_type.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME role_type -=head1 DESCRIPTION +\=head1 DESCRIPTION A list of roles that contributors may have. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A descriptive identifier. label (character varying) - A human readable label. @@ -15,7 +15,7 @@ A list of roles that contributors may have. comment (character varying) - A description of this role. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.role_type" Column | Type | Modifiers | Storage | Stats target | Description @@ -28,8 +28,9 @@ A list of roles that contributors may have. "role_type_pkey" PRIMARY KEY, btree (identifier) Referenced by: TABLE "contributor" CONSTRAINT "fk_role_type" FOREIGN KEY (role_type_identifier) REFERENCES role_type(identifier) + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_scenario.pod b/db/dist/docs/pod/table_scenario.pod index f6769616..f3938039 100644 --- a/db/dist/docs/pod/table_scenario.pod +++ b/db/dist/docs/pod/table_scenario.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME scenario -=head1 DESCRIPTION +\=head1 DESCRIPTION A scenario may be associated with a model via a model run. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A desciptive identifier. name (character varying) - A brief name. @@ -15,7 +15,7 @@ A scenario may be associated with a model via a model run. description_attribution (character varying) - A URL containing the description. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.scenario" Column | Type | Modifiers | Storage | Stats target | Description @@ -33,8 +33,9 @@ A scenario may be associated with a model via a model run. Triggers: audit_trigger_row AFTER INSERT OR DELETE OR UPDATE ON scenario FOR EACH ROW EXECUTE PROCEDURE audit.if_modified_func('true') audit_trigger_stm AFTER TRUNCATE ON scenario FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_table.pod b/db/dist/docs/pod/table_table.pod index 6437e7c7..1b700084 100644 --- a/db/dist/docs/pod/table_table.pod +++ b/db/dist/docs/pod/table_table.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME table -=head1 DESCRIPTION +\=head1 DESCRIPTION A table is in a report, and may contain one or more arrays. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A desciptive identifier. report_identifier (character varying) - The report. @@ -18,7 +18,7 @@ A table is in a report, and may contain one or more arrays. url (character varying) - A URL for a landing page for this table. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.table" Column | Type | Modifiers | Storage | Stats target | Description @@ -46,8 +46,9 @@ A table is in a report, and may contain one or more arrays. audit_trigger_stm AFTER TRUNCATE ON "table" FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON "table" FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON "table" FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text OR new.report_identifier::text <> old.report_identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/table_webpage.pod b/db/dist/docs/pod/table_webpage.pod index b955242f..7853f94a 100644 --- a/db/dist/docs/pod/table_webpage.pod +++ b/db/dist/docs/pod/table_webpage.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME webpage -=head1 DESCRIPTION +\=head1 DESCRIPTION A webpage is a type of publication. -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - A globally identifier (UUID) url (character varying) - The URL. @@ -15,7 +15,7 @@ A webpage is a type of publication. access_date (timestamp without time zone) - The date on which this webpage was accessed. -=head1 SCHEMA +\=head1 SCHEMA Table "gcis_metadata.webpage" Column | Type | Modifiers | Storage | Stats target | Description @@ -34,9 +34,10 @@ A webpage is a type of publication. audit_trigger_stm AFTER TRUNCATE ON webpage FOR EACH STATEMENT EXECUTE PROCEDURE audit.if_modified_func('true') delpub BEFORE DELETE ON webpage FOR EACH ROW EXECUTE PROCEDURE delete_publication() updatepub BEFORE UPDATE ON webpage FOR EACH ROW WHEN (new.identifier::text <> old.identifier::text) EXECUTE PROCEDURE update_publication() + Has OIDs: no -=cut +\=cut diff --git a/db/dist/docs/pod/view_vw_gcmd_keyword.pod b/db/dist/docs/pod/view_vw_gcmd_keyword.pod index 9992b5c6..622e591d 100644 --- a/db/dist/docs/pod/view_vw_gcmd_keyword.pod +++ b/db/dist/docs/pod/view_vw_gcmd_keyword.pod @@ -1,13 +1,13 @@ -=head1 NAME +\=head1 NAME vw_gcmd_keyword -=head1 DESCRIPTION +\=head1 DESCRIPTION -=head1 FIELDS +\=head1 FIELDS identifier (character varying) - category (character varying) - @@ -19,7 +19,7 @@ vw_gcmd_keyword level4 (character varying) - -=head1 SCHEMA +\=head1 SCHEMA View "gcis_metadata.vw_gcmd_keyword" Column | Type | Modifiers | Storage | Description @@ -33,112 +33,107 @@ vw_gcmd_keyword level3 | character varying | | extended | level4 | character varying | | extended | View definition: - SELECT COALESCE(level4.identifier, level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - level3.label AS level3, - level4.label AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text - JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text - JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text - JOIN gcmd_keyword level3 ON level3.parent_identifier::text = level2.identifier::text - JOIN gcmd_keyword level4 ON level4.parent_identifier::text = level3.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - level3.label AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text - JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text - JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text - JOIN gcmd_keyword level3 ON level3.parent_identifier::text = level2.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - level2.label AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text - JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text - JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - level1.label AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text - JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(term.identifier, topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - term.label AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(topic.identifier, category.identifier) AS identifier, - category.label AS category, - topic.label AS topic, - NULL::character varying AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text - UNION - SELECT COALESCE(category.identifier) AS identifier, - category.label AS category, - NULL::character varying AS topic, - NULL::character varying AS term, - NULL::character varying AS level1, - NULL::character varying AS level2, - NULL::character varying AS level3, - NULL::character varying AS level4 - FROM gcmd_keyword wrapper - JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text - WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text; + ( ( ( ( ( SELECT COALESCE(level4.identifier, level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, + category.label AS category, + topic.label AS topic, + term.label AS term, + level1.label AS level1, + level2.label AS level2, + level3.label AS level3, + level4.label AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text + JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text + JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text + JOIN gcmd_keyword level3 ON level3.parent_identifier::text = level2.identifier::text + JOIN gcmd_keyword level4 ON level4.parent_identifier::text = level3.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text + UNION + SELECT COALESCE(level3.identifier, level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, + category.label AS category, + topic.label AS topic, + term.label AS term, + level1.label AS level1, + level2.label AS level2, + level3.label AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text + JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text + JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text + JOIN gcmd_keyword level3 ON level3.parent_identifier::text = level2.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text) + UNION + SELECT COALESCE(level2.identifier, level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, + category.label AS category, + topic.label AS topic, + term.label AS term, + level1.label AS level1, + level2.label AS level2, + NULL::character varying AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text + JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text + JOIN gcmd_keyword level2 ON level2.parent_identifier::text = level1.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text) + UNION + SELECT COALESCE(level1.identifier, term.identifier, topic.identifier, category.identifier) AS identifier, + category.label AS category, + topic.label AS topic, term.label AS term, + level1.label AS level1, + NULL::character varying AS level2, + NULL::character varying AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text + JOIN gcmd_keyword level1 ON level1.parent_identifier::text = term.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text) + UNION + SELECT COALESCE(term.identifier, topic.identifier, category.identifier) AS identifier, + category.label AS category, topic.label AS topic, + term.label AS term, + NULL::character varying AS level1, + NULL::character varying AS level2, + NULL::character varying AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + JOIN gcmd_keyword term ON term.parent_identifier::text = topic.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text) + UNION + SELECT COALESCE(topic.identifier, category.identifier) AS identifier, + category.label AS category, topic.label AS topic, + NULL::character varying AS term, + NULL::character varying AS level1, + NULL::character varying AS level2, + NULL::character varying AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + JOIN gcmd_keyword topic ON topic.parent_identifier::text = category.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text) + UNION + SELECT COALESCE(category.identifier) AS identifier, + category.label AS category, NULL::character varying AS topic, + NULL::character varying AS term, NULL::character varying AS level1, + NULL::character varying AS level2, + NULL::character varying AS level3, + NULL::character varying AS level4 + FROM gcmd_keyword wrapper + JOIN gcmd_keyword category ON category.parent_identifier::text = wrapper.identifier::text + WHERE wrapper.identifier::text = '1eb0ea0a-312c-4d74-8d42-6f1ad758f999'::text AND wrapper.label::text = 'Science Keywords'::text; -=cut +\=cut