Revision 12644
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
273 | 273 |
|
274 | 274 |
|
275 | 275 |
-- |
276 |
-- Name: keys_~type._plots_09_list_of_plots_which_use_line_intercept; Type: TYPE; Schema: public_validations; Owner: - |
|
277 |
-- |
|
278 |
|
|
279 |
|
|
280 |
|
|
281 |
|
|
282 |
-- |
|
276 | 283 |
-- Name: keys_~type._plots_10_count_of_individuals_per_plot_in_each_proj; Type: TYPE; Schema: public_validations; Owner: - |
277 | 284 |
-- |
278 | 285 |
|
... | ... | |
469 | 476 |
|
470 | 477 |
|
471 | 478 |
-- |
479 |
-- Name: values__~type._plots_09_list_of_plots_which_use_line_intercept; Type: TYPE; Schema: public_validations; Owner: - |
|
480 |
-- |
|
481 |
|
|
482 |
|
|
483 |
|
|
484 |
|
|
485 |
-- |
|
472 | 486 |
-- Name: values__~type._plots_10_count_of_individuals_per_plot_in_each_p; Type: TYPE; Schema: public_validations; Owner: - |
473 | 487 |
-- |
474 | 488 |
|
... | ... | |
1397 | 1411 |
|
1398 | 1412 |
|
1399 | 1413 |
-- |
1414 |
-- Name: ~type._plots_09_list_of_plots_which_use_line_intercept; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1415 |
-- |
|
1416 |
|
|
1417 |
CREATE TABLE `~type._plots_09_list_of_plots_which_use_line_intercept` ( |
|
1418 |
project_name varchar(255), |
|
1419 |
plot_code varchar(255) |
|
1420 |
); |
|
1421 |
|
|
1422 |
|
|
1423 |
-- |
|
1424 |
-- Name: keys(`~type._plots_09_list_of_plots_which_use_line_intercept`); Type: FUNCTION; Schema: public_validations; Owner: - |
|
1425 |
-- |
|
1426 |
|
|
1427 |
|
|
1428 |
|
|
1429 |
|
|
1430 |
-- |
|
1400 | 1431 |
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
1401 | 1432 |
-- |
1402 | 1433 |
|
... | ... | |
1940 | 1971 |
|
1941 | 1972 |
|
1942 | 1973 |
-- |
1974 |
-- Name: values_(`~type._plots_09_list_of_plots_which_use_line_intercept`); Type: FUNCTION; Schema: public_validations; Owner: - |
|
1975 |
-- |
|
1976 |
|
|
1977 |
|
|
1978 |
|
|
1979 |
|
|
1980 |
-- |
|
1943 | 1981 |
-- Name: values_(`~type._plots_10_count_of_individuals_per_plot_in_each_project`); Type: FUNCTION; Schema: public_validations; Owner: - |
1944 | 1982 |
-- |
1945 | 1983 |
|
... | ... | |
4741 | 4779 |
|
4742 | 4780 |
|
4743 | 4781 |
-- |
4782 |
-- Name: _plots_09_list_of_plots_which_use_line_intercept; Type: VIEW; Schema: public_validations; Owner: - |
|
4783 |
-- |
|
4784 |
|
|
4785 |
|
|
4786 |
|
|
4787 |
|
|
4788 |
-- |
|
4744 | 4789 |
-- Name: _plots_10_count_of_individuals_per_plot_in_each_project; Type: VIEW; Schema: public_validations; Owner: - |
4745 | 4790 |
-- |
4746 | 4791 |
|
... | ... | |
7789 | 7834 |
|
7790 | 7835 |
|
7791 | 7836 |
-- |
7837 |
-- Data for Name: ~type._plots_09_list_of_plots_which_use_line_intercept; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
7838 |
-- |
|
7839 |
|
|
7840 |
|
|
7841 |
|
|
7842 |
-- |
|
7792 | 7843 |
-- Data for Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE DATA; Schema: public_validations; Owner: - |
7793 | 7844 |
-- |
7794 | 7845 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
540 | 540 |
|
541 | 541 |
|
542 | 542 |
-- |
543 |
-- Name: keys_~type._plots_09_list_of_plots_which_use_line_intercept; Type: TYPE; Schema: public_validations; Owner: - |
|
544 |
-- |
|
545 |
|
|
546 |
CREATE TYPE "keys_~type._plots_09_list_of_plots_which_use_line_intercept" AS ( |
|
547 |
project_name text, |
|
548 |
plot_code text |
|
549 |
); |
|
550 |
|
|
551 |
|
|
552 |
-- |
|
543 | 553 |
-- Name: keys_~type._plots_10_count_of_individuals_per_plot_in_each_proj; Type: TYPE; Schema: public_validations; Owner: - |
544 | 554 |
-- |
545 | 555 |
|
... | ... | |
811 | 821 |
|
812 | 822 |
|
813 | 823 |
-- |
824 |
-- Name: values__~type._plots_09_list_of_plots_which_use_line_intercept; Type: TYPE; Schema: public_validations; Owner: - |
|
825 |
-- |
|
826 |
|
|
827 |
CREATE TYPE "values__~type._plots_09_list_of_plots_which_use_line_intercept" AS ( |
|
828 |
project_name text, |
|
829 |
plot_code text |
|
830 |
); |
|
831 |
|
|
832 |
|
|
833 |
-- |
|
814 | 834 |
-- Name: values__~type._plots_10_count_of_individuals_per_plot_in_each_p; Type: TYPE; Schema: public_validations; Owner: - |
815 | 835 |
-- |
816 | 836 |
|
... | ... | |
2697 | 2717 |
|
2698 | 2718 |
|
2699 | 2719 |
-- |
2720 |
-- Name: ~type._plots_09_list_of_plots_which_use_line_intercept; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2721 |
-- |
|
2722 |
|
|
2723 |
CREATE TABLE "~type._plots_09_list_of_plots_which_use_line_intercept" ( |
|
2724 |
project_name text, |
|
2725 |
plot_code text |
|
2726 |
); |
|
2727 |
|
|
2728 |
|
|
2729 |
-- |
|
2730 |
-- Name: keys("~type._plots_09_list_of_plots_which_use_line_intercept"); Type: FUNCTION; Schema: public_validations; Owner: - |
|
2731 |
-- |
|
2732 |
|
|
2733 |
CREATE FUNCTION keys(value "~type._plots_09_list_of_plots_which_use_line_intercept") RETURNS "keys_~type._plots_09_list_of_plots_which_use_line_intercept" |
|
2734 |
LANGUAGE sql IMMUTABLE |
|
2735 |
AS $_$ |
|
2736 |
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_09_list_of_plots_which_use_line_intercept" |
|
2737 |
$_$; |
|
2738 |
|
|
2739 |
|
|
2740 |
-- |
|
2700 | 2741 |
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
2701 | 2742 |
-- |
2702 | 2743 |
|
... | ... | |
3648 | 3689 |
|
3649 | 3690 |
|
3650 | 3691 |
-- |
3692 |
-- Name: values_("~type._plots_09_list_of_plots_which_use_line_intercept"); Type: FUNCTION; Schema: public_validations; Owner: - |
|
3693 |
-- |
|
3694 |
|
|
3695 |
CREATE FUNCTION values_(value "~type._plots_09_list_of_plots_which_use_line_intercept") RETURNS "values__~type._plots_09_list_of_plots_which_use_line_intercept" |
|
3696 |
LANGUAGE sql IMMUTABLE |
|
3697 |
AS $_$ |
|
3698 |
SELECT ROW($1.project_name, $1.plot_code)::public_validations."values__~type._plots_09_list_of_plots_which_use_line_intercept" |
|
3699 |
$_$; |
|
3700 |
|
|
3701 |
|
|
3702 |
-- |
|
3651 | 3703 |
-- Name: values_("~type._plots_10_count_of_individuals_per_plot_in_each_project"); Type: FUNCTION; Schema: public_validations; Owner: - |
3652 | 3704 |
-- |
3653 | 3705 |
|
... | ... | |
7571 | 7623 |
|
7572 | 7624 |
|
7573 | 7625 |
-- |
7626 |
-- Name: _plots_09_list_of_plots_which_use_line_intercept; Type: VIEW; Schema: public_validations; Owner: - |
|
7627 |
-- |
|
7628 |
|
|
7629 |
CREATE VIEW _plots_09_list_of_plots_which_use_line_intercept AS |
|
7630 |
SELECT project.projectname AS project_name, |
|
7631 |
plot.authorlocationcode AS plot_code |
|
7632 |
FROM ((public.plot |
|
7633 |
JOIN public.locationevent USING (plot_id)) |
|
7634 |
LEFT JOIN public.project USING (project_id)) |
|
7635 |
WHERE ((plot.source_id = ( SELECT public.source_by_shortname(("current_schema"())::text) AS source_by_shortname)) AND (EXISTS ( SELECT NULL::unknown AS unknown |
|
7636 |
FROM ((public.locationevent locationevent_1 |
|
7637 |
JOIN public.taxonoccurrence USING (locationevent_id)) |
|
7638 |
JOIN public.aggregateoccurrence USING (taxonoccurrence_id)) |
|
7639 |
WHERE ((locationevent_1.plot_id = plot.plot_id) AND (aggregateoccurrence.linecover_m IS NOT NULL)) |
|
7640 |
LIMIT 1))) |
|
7641 |
ORDER BY plot.authorlocationcode; |
|
7642 |
|
|
7643 |
|
|
7644 |
-- |
|
7574 | 7645 |
-- Name: _plots_10_count_of_individuals_per_plot_in_each_project; Type: VIEW; Schema: public_validations; Owner: - |
7575 | 7646 |
-- |
7576 | 7647 |
|
... | ... | |
10811 | 10882 |
|
10812 | 10883 |
|
10813 | 10884 |
-- |
10885 |
-- Data for Name: ~type._plots_09_list_of_plots_which_use_line_intercept; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
10886 |
-- |
|
10887 |
|
|
10888 |
|
|
10889 |
|
|
10890 |
-- |
|
10814 | 10891 |
-- Data for Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE DATA; Schema: public_validations; Owner: - |
10815 | 10892 |
-- |
10816 | 10893 |
|
Also available in: Unified diff
schemas/vegbien.sql: implemented _plots_09_list_of_plots_which_use_line_intercept