2633 |
2633 |
CREATE FUNCTION keys(value "~type._plots_04_count_of_plots_in_each_project_in_this_source") RETURNS "keys_~type._plots_04_count_of_plots_in_each_project_in_this_sou"
|
2634 |
2634 |
LANGUAGE sql IMMUTABLE
|
2635 |
2635 |
AS $_$
|
2636 |
|
SELECT ROW($1.project_name)::public_validations."keys_~type._plots_04_count_of_plots_in_each_project_in_this_source"
|
|
2636 |
SELECT ROW($1.project_name)::public_validations."keys_~type._plots_04_count_of_plots_in_each_project_in_this_sou"
|
2637 |
2637 |
$_$;
|
2638 |
2638 |
|
2639 |
2639 |
|
... | ... | |
2728 |
2728 |
|
2729 |
2729 |
CREATE TABLE "~type._plots_08_list_of_plots_which_use_percent_cover" (
|
2730 |
2730 |
project_name text,
|
2731 |
|
plot_code text
|
|
2731 |
plot_code text,
|
|
2732 |
copies bigint NOT NULL
|
2732 |
2733 |
);
|
2733 |
2734 |
|
2734 |
2735 |
|
... | ... | |
2782 |
2783 |
CREATE FUNCTION keys(value "~type._plots_10_count_of_individuals_per_plot_in_each_project") RETURNS "keys_~type._plots_10_count_of_individuals_per_plot_in_each_proj"
|
2783 |
2784 |
LANGUAGE sql IMMUTABLE
|
2784 |
2785 |
AS $_$
|
2785 |
|
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_10_count_of_individuals_per_plot_in_each_project"
|
|
2786 |
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_10_count_of_individuals_per_plot_in_each_proj"
|
2786 |
2787 |
$_$;
|
2787 |
2788 |
|
2788 |
2789 |
|
... | ... | |
2849 |
2850 |
CREATE FUNCTION keys(value "~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project") RETURNS "keys_~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_pr"
|
2850 |
2851 |
LANGUAGE sql IMMUTABLE
|
2851 |
2852 |
AS $_$
|
2852 |
|
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project"
|
|
2853 |
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_pr"
|
2853 |
2854 |
$_$;
|
2854 |
2855 |
|
2855 |
2856 |
|
... | ... | |
2871 |
2872 |
CREATE FUNCTION keys(value "~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_") RETURNS "keys_~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plo"
|
2872 |
2873 |
LANGUAGE sql IMMUTABLE
|
2873 |
2874 |
AS $_$
|
2874 |
|
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."keys_~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_"
|
|
2875 |
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."keys_~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plo"
|
2875 |
2876 |
$_$;
|
2876 |
2877 |
|
2877 |
2878 |
|
... | ... | |
2894 |
2895 |
CREATE FUNCTION keys(value "~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e") RETURNS "keys_~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot"
|
2895 |
2896 |
LANGUAGE sql IMMUTABLE
|
2896 |
2897 |
AS $_$
|
2897 |
|
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."keys_~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e"
|
|
2898 |
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."keys_~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot"
|
2898 |
2899 |
$_$;
|
2899 |
2900 |
|
2900 |
2901 |
|
... | ... | |
2906 |
2907 |
project_name text,
|
2907 |
2908 |
plot_code text,
|
2908 |
2909 |
taxon text,
|
2909 |
|
totalpercentcover double precision
|
|
2910 |
totalpercentcover double precision,
|
|
2911 |
copies bigint NOT NULL
|
2910 |
2912 |
);
|
2911 |
2913 |
|
2912 |
2914 |
|
... | ... | |
2962 |
2964 |
CREATE FUNCTION keys(value "~type._plots_17_count_of_subplots_per_plot_for_each_project") RETURNS "keys_~type._plots_17_count_of_subplots_per_plot_for_each_projec"
|
2963 |
2965 |
LANGUAGE sql IMMUTABLE
|
2964 |
2966 |
AS $_$
|
2965 |
|
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_17_count_of_subplots_per_plot_for_each_project"
|
|
2967 |
SELECT ROW($1.project_name, $1.plot_code)::public_validations."keys_~type._plots_17_count_of_subplots_per_plot_for_each_projec"
|
2966 |
2968 |
$_$;
|
2967 |
2969 |
|
2968 |
2970 |
|
... | ... | |
3116 |
3118 |
CREATE TABLE "~type._traits_07_trait_value_and_units" (
|
3117 |
3119 |
trait text,
|
3118 |
3120 |
value text,
|
3119 |
|
units text
|
|
3121 |
units text,
|
|
3122 |
copies bigint NOT NULL
|
3120 |
3123 |
);
|
3121 |
3124 |
|
3122 |
3125 |
|
... | ... | |
3138 |
3141 |
CREATE TABLE "~type._traits_08_taxonname_trait_and_value" (
|
3139 |
3142 |
taxonwithauthor text,
|
3140 |
3143 |
trait text,
|
3141 |
|
value text
|
|
3144 |
value text,
|
|
3145 |
copies bigint NOT NULL
|
3142 |
3146 |
);
|
3143 |
3147 |
|
3144 |
3148 |
|
... | ... | |
3679 |
3683 |
CREATE FUNCTION values_(value "~type._plots_04_count_of_plots_in_each_project_in_this_source") RETURNS "values__~type._plots_04_count_of_plots_in_each_project_in_this_"
|
3680 |
3684 |
LANGUAGE sql IMMUTABLE
|
3681 |
3685 |
AS $_$
|
3682 |
|
SELECT ROW($1.plots)::public_validations."values__~type._plots_04_count_of_plots_in_each_project_in_this_source"
|
|
3686 |
SELECT ROW($1.plots)::public_validations."values__~type._plots_04_count_of_plots_in_each_project_in_this_"
|
3683 |
3687 |
$_$;
|
3684 |
3688 |
|
3685 |
3689 |
|
... | ... | |
3756 |
3760 |
CREATE FUNCTION values_(value "~type._plots_10_count_of_individuals_per_plot_in_each_project") RETURNS "values__~type._plots_10_count_of_individuals_per_plot_in_each_p"
|
3757 |
3761 |
LANGUAGE sql IMMUTABLE
|
3758 |
3762 |
AS $_$
|
3759 |
|
SELECT ROW($1.individuals)::public_validations."values__~type._plots_10_count_of_individuals_per_plot_in_each_project"
|
|
3763 |
SELECT ROW($1.individuals)::public_validations."values__~type._plots_10_count_of_individuals_per_plot_in_each_p"
|
3760 |
3764 |
$_$;
|
3761 |
3765 |
|
3762 |
3766 |
|
... | ... | |
3789 |
3793 |
CREATE FUNCTION values_(value "~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project") RETURNS "values__~type._plots_12_count_of_verbatim_taxa_per_plot_in_each"
|
3790 |
3794 |
LANGUAGE sql IMMUTABLE
|
3791 |
3795 |
AS $_$
|
3792 |
|
SELECT ROW($1.taxa)::public_validations."values__~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project"
|
|
3796 |
SELECT ROW($1.taxa)::public_validations."values__~type._plots_12_count_of_verbatim_taxa_per_plot_in_each"
|
3793 |
3797 |
$_$;
|
3794 |
3798 |
|
3795 |
3799 |
|
... | ... | |
3800 |
3804 |
CREATE FUNCTION values_(value "~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_") RETURNS "values__~type._plots_13_list_of_distinct_verbatim_taxa_in_each_"
|
3801 |
3805 |
LANGUAGE sql IMMUTABLE
|
3802 |
3806 |
AS $_$
|
3803 |
|
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."values__~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_"
|
|
3807 |
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)::public_validations."values__~type._plots_13_list_of_distinct_verbatim_taxa_in_each_"
|
3804 |
3808 |
$_$;
|
3805 |
3809 |
|
3806 |
3810 |
|
... | ... | |
3811 |
3815 |
CREATE FUNCTION values_(value "~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e") RETURNS "values__~type._plots_14_count_of_indiv_per_verbatim_taxon_per_p"
|
3812 |
3816 |
LANGUAGE sql IMMUTABLE
|
3813 |
3817 |
AS $_$
|
3814 |
|
SELECT ROW($1.individuals)::public_validations."values__~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e"
|
|
3818 |
SELECT ROW($1.individuals)::public_validations."values__~type._plots_14_count_of_indiv_per_verbatim_taxon_per_p"
|
3815 |
3819 |
$_$;
|
3816 |
3820 |
|
3817 |
3821 |
|
... | ... | |
3844 |
3848 |
CREATE FUNCTION values_(value "~type._plots_17_count_of_subplots_per_plot_for_each_project") RETURNS "values__~type._plots_17_count_of_subplots_per_plot_for_each_pro"
|
3845 |
3849 |
LANGUAGE sql IMMUTABLE
|
3846 |
3850 |
AS $_$
|
3847 |
|
SELECT ROW($1.subplots)::public_validations."values__~type._plots_17_count_of_subplots_per_plot_for_each_project"
|
|
3851 |
SELECT ROW($1.subplots)::public_validations."values__~type._plots_17_count_of_subplots_per_plot_for_each_pro"
|
3848 |
3852 |
$_$;
|
3849 |
3853 |
|
3850 |
3854 |
|
schemas/vegbien.sql: public_validations: regenerated ~type tables, which adds `copies` columns for queries with a mismatch in the # of occurrences of each row