Project

General

Profile

« Previous | Next » 

Revision 12566

schemas/vegbien.sql: public_validations: auto-added keys() functions for all queries

View differences:

trunk/schemas/vegbien.my.sql
875 875

  
876 876

  
877 877
--
878
-- Name: ~type._plots_01_count_of_projects; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
879
--
880

  
881
CREATE TABLE `~type._plots_01_count_of_projects` (
882
    projects varchar(255)
883
);
884

  
885

  
886
--
887
-- Name: keys(`~type._plots_01_count_of_projects`); Type: FUNCTION; Schema: public_validations; Owner: -
888
--
889

  
890

  
891

  
892

  
893
--
894
-- Name: ~type._plots_02_list_of_project_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
895
--
896

  
897
CREATE TABLE `~type._plots_02_list_of_project_names` (
898
    project_name varchar(255)
899
);
900

  
901

  
902
--
903
-- Name: keys(`~type._plots_02_list_of_project_names`); Type: FUNCTION; Schema: public_validations; Owner: -
904
--
905

  
906

  
907

  
908

  
909
--
910
-- Name: ~type._plots_03_count_of_all_plots_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
911
--
912

  
913
CREATE TABLE `~type._plots_03_count_of_all_plots_in_this_source` (
914
    plots varchar(255)
915
);
916

  
917

  
918
--
919
-- Name: keys(`~type._plots_03_count_of_all_plots_in_this_source`); Type: FUNCTION; Schema: public_validations; Owner: -
920
--
921

  
922

  
923

  
924

  
925
--
878 926
-- Name: ~type._plots_04_count_of_plots_in_each_project_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
879 927
--
880 928

  
......
892 940

  
893 941

  
894 942
--
943
-- Name: ~type._plots_05_list_of_plot_codes_by_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
944
--
945

  
946
CREATE TABLE `~type._plots_05_list_of_plot_codes_by_project` (
947
    project_name varchar(255),
948
    plot_code varchar(255)
949
);
950

  
951

  
952
--
953
-- Name: keys(`~type._plots_05_list_of_plot_codes_by_project`); Type: FUNCTION; Schema: public_validations; Owner: -
954
--
955

  
956

  
957

  
958

  
959
--
960
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
961
--
962

  
963
CREATE TABLE `~type._plots_06_list_of_plots_with_stem_measurements` (
964
    project_name varchar(255),
965
    plot_code varchar(255)
966
);
967

  
968

  
969
--
970
-- Name: keys(`~type._plots_06_list_of_plots_with_stem_measurements`); Type: FUNCTION; Schema: public_validations; Owner: -
971
--
972

  
973

  
974

  
975

  
976
--
977
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
978
--
979

  
980
CREATE TABLE `~type._plots_10_count_of_individuals_per_plot_in_each_project` (
981
    project_name varchar(255),
982
    plot_code varchar(255),
983
    individuals varchar(255)
984
);
985

  
986

  
987
--
988
-- Name: keys(`~type._plots_10_count_of_individuals_per_plot_in_each_project`); Type: FUNCTION; Schema: public_validations; Owner: -
989
--
990

  
991

  
992

  
993

  
994
--
995
-- Name: ~type._plots_11_count_of_stems_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
996
--
997

  
998
CREATE TABLE `~type._plots_11_count_of_stems_per_plot_in_each_project` (
999
    project_name varchar(255),
1000
    plot_code varchar(255),
1001
    stems varchar(255)
1002
);
1003

  
1004

  
1005
--
1006
-- Name: keys(`~type._plots_11_count_of_stems_per_plot_in_each_project`); Type: FUNCTION; Schema: public_validations; Owner: -
1007
--
1008

  
1009

  
1010

  
1011

  
1012
--
1013
-- Name: ~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1014
--
1015

  
1016
CREATE TABLE `~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project` (
1017
    project_name varchar(255),
1018
    plot_code varchar(255),
1019
    taxa varchar(255)
1020
);
1021

  
1022

  
1023
--
1024
-- Name: keys(`~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project`); Type: FUNCTION; Schema: public_validations; Owner: -
1025
--
1026

  
1027

  
1028

  
1029

  
1030
--
1031
-- Name: ~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1032
--
1033

  
1034
CREATE TABLE `~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_` (
1035
    project_name varchar(255),
1036
    plot_code varchar(255),
1037
    taxon varchar(255)
1038
);
1039

  
1040

  
1041
--
1042
-- Name: keys(`~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_`); Type: FUNCTION; Schema: public_validations; Owner: -
1043
--
1044

  
1045

  
1046

  
1047

  
1048
--
1049
-- Name: ~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1050
--
1051

  
1052
CREATE TABLE `~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e` (
1053
    project_name varchar(255),
1054
    plot_code varchar(255),
1055
    taxon varchar(255),
1056
    individuals varchar(255)
1057
);
1058

  
1059

  
1060
--
1061
-- Name: keys(`~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e`); Type: FUNCTION; Schema: public_validations; Owner: -
1062
--
1063

  
1064

  
1065

  
1066

  
1067
--
1068
-- Name: ~type._plots_17_count_of_subplots_per_plot_for_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1069
--
1070

  
1071
CREATE TABLE `~type._plots_17_count_of_subplots_per_plot_for_each_project` (
1072
    project_name varchar(255),
1073
    plot_code varchar(255),
1074
    subplots varchar(255)
1075
);
1076

  
1077

  
1078
--
1079
-- Name: keys(`~type._plots_17_count_of_subplots_per_plot_for_each_project`); Type: FUNCTION; Schema: public_validations; Owner: -
1080
--
1081

  
1082

  
1083

  
1084

  
1085
--
1086
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1087
--
1088

  
1089
CREATE TABLE `~type._traits_01_count_records` (
1090
    `totalRecords` varchar(255)
1091
);
1092

  
1093

  
1094
--
1095
-- Name: keys(`~type._traits_01_count_records`); Type: FUNCTION; Schema: public_validations; Owner: -
1096
--
1097

  
1098

  
1099

  
1100

  
1101
--
1102
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1103
--
1104

  
1105
CREATE TABLE `~type._traits_02_count_trait_names` (
1106
    traits varchar(255)
1107
);
1108

  
1109

  
1110
--
1111
-- Name: keys(`~type._traits_02_count_trait_names`); Type: FUNCTION; Schema: public_validations; Owner: -
1112
--
1113

  
1114

  
1115

  
1116

  
1117
--
1118
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1119
--
1120

  
1121
CREATE TABLE `~type._traits_03_list_trait_names` (
1122
    trait varchar(255)
1123
);
1124

  
1125

  
1126
--
1127
-- Name: keys(`~type._traits_03_list_trait_names`); Type: FUNCTION; Schema: public_validations; Owner: -
1128
--
1129

  
1130

  
1131

  
1132

  
1133
--
895 1134
-- Name: ~type._traits_04_count_records_per_trait; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
896 1135
--
897 1136

  
......
909 1148

  
910 1149

  
911 1150
--
1151
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1152
--
1153

  
1154
CREATE TABLE `~type._traits_05_count_taxa` (
1155
    taxa varchar(255)
1156
);
1157

  
1158

  
1159
--
1160
-- Name: keys(`~type._traits_05_count_taxa`); Type: FUNCTION; Schema: public_validations; Owner: -
1161
--
1162

  
1163

  
1164

  
1165

  
1166
--
1167
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1168
--
1169

  
1170
CREATE TABLE `~type._traits_06_list_distinct_taxa` (
1171
    taxonwithauthor varchar(255)
1172
);
1173

  
1174

  
1175
--
1176
-- Name: keys(`~type._traits_06_list_distinct_taxa`); Type: FUNCTION; Schema: public_validations; Owner: -
1177
--
1178

  
1179

  
1180

  
1181

  
1182
--
1183
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1184
--
1185

  
1186
CREATE TABLE `~type._traits_07_trait_value_and_units` (
1187
    trait varchar(255),
1188
    value varchar(255),
1189
    units varchar(255)
1190
);
1191

  
1192

  
1193
--
1194
-- Name: keys(`~type._traits_07_trait_value_and_units`); Type: FUNCTION; Schema: public_validations; Owner: -
1195
--
1196

  
1197

  
1198

  
1199

  
1200
--
1201
-- Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1202
--
1203

  
1204
CREATE TABLE `~type._traits_08_taxonname_trait_and_value` (
1205
    taxonwithauthor varchar(255),
1206
    trait varchar(255),
1207
    value varchar(255)
1208
);
1209

  
1210

  
1211
--
1212
-- Name: keys(`~type._traits_08_taxonname_trait_and_value`); Type: FUNCTION; Schema: public_validations; Owner: -
1213
--
1214

  
1215

  
1216

  
1217

  
1218
--
912 1219
-- Name: query_view_relation_max_prefix_len(); Type: FUNCTION; Schema: public_validations; Owner: -
913 1220
--
914 1221

  
......
3903 4210

  
3904 4211

  
3905 4212

  
3906
--
3907
-- Name: ~type._plots_01_count_of_projects; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3908
--
3909 4213

  
3910
CREATE TABLE `~type._plots_01_count_of_projects` (
3911
    projects varchar(255)
3912
);
3913 4214

  
3914

  
3915 4215
--
3916
-- Name: ~type._plots_02_list_of_project_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3917
--
3918

  
3919
CREATE TABLE `~type._plots_02_list_of_project_names` (
3920
    project_name varchar(255)
3921
);
3922

  
3923

  
3924
--
3925
-- Name: ~type._plots_03_count_of_all_plots_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3926
--
3927

  
3928
CREATE TABLE `~type._plots_03_count_of_all_plots_in_this_source` (
3929
    plots varchar(255)
3930
);
3931

  
3932

  
3933
--
3934
-- Name: ~type._plots_05_list_of_plot_codes_by_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3935
--
3936

  
3937
CREATE TABLE `~type._plots_05_list_of_plot_codes_by_project` (
3938
    project_name varchar(255),
3939
    plot_code varchar(255)
3940
);
3941

  
3942

  
3943
--
3944
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3945
--
3946

  
3947
CREATE TABLE `~type._plots_06_list_of_plots_with_stem_measurements` (
3948
    project_name varchar(255),
3949
    plot_code varchar(255)
3950
);
3951

  
3952

  
3953
--
3954
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3955
--
3956

  
3957
CREATE TABLE `~type._plots_10_count_of_individuals_per_plot_in_each_project` (
3958
    project_name varchar(255),
3959
    plot_code varchar(255),
3960
    individuals varchar(255)
3961
);
3962

  
3963

  
3964
--
3965
-- Name: ~type._plots_11_count_of_stems_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3966
--
3967

  
3968
CREATE TABLE `~type._plots_11_count_of_stems_per_plot_in_each_project` (
3969
    project_name varchar(255),
3970
    plot_code varchar(255),
3971
    stems varchar(255)
3972
);
3973

  
3974

  
3975
--
3976
-- Name: ~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3977
--
3978

  
3979
CREATE TABLE `~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project` (
3980
    project_name varchar(255),
3981
    plot_code varchar(255),
3982
    taxa varchar(255)
3983
);
3984

  
3985

  
3986
--
3987
-- Name: ~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3988
--
3989

  
3990
CREATE TABLE `~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_` (
3991
    project_name varchar(255),
3992
    plot_code varchar(255),
3993
    taxon varchar(255)
3994
);
3995

  
3996

  
3997
--
3998
-- Name: ~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
3999
--
4000

  
4001
CREATE TABLE `~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e` (
4002
    project_name varchar(255),
4003
    plot_code varchar(255),
4004
    taxon varchar(255),
4005
    individuals varchar(255)
4006
);
4007

  
4008

  
4009
--
4010
-- Name: ~type._plots_17_count_of_subplots_per_plot_for_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4011
--
4012

  
4013
CREATE TABLE `~type._plots_17_count_of_subplots_per_plot_for_each_project` (
4014
    project_name varchar(255),
4015
    plot_code varchar(255),
4016
    subplots varchar(255)
4017
);
4018

  
4019

  
4020
--
4021
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4022
--
4023

  
4024
CREATE TABLE `~type._traits_01_count_records` (
4025
    `totalRecords` varchar(255)
4026
);
4027

  
4028

  
4029
--
4030
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4031
--
4032

  
4033
CREATE TABLE `~type._traits_02_count_trait_names` (
4034
    traits varchar(255)
4035
);
4036

  
4037

  
4038
--
4039
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4040
--
4041

  
4042
CREATE TABLE `~type._traits_03_list_trait_names` (
4043
    trait varchar(255)
4044
);
4045

  
4046

  
4047
--
4048
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4049
--
4050

  
4051
CREATE TABLE `~type._traits_05_count_taxa` (
4052
    taxa varchar(255)
4053
);
4054

  
4055

  
4056
--
4057
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4058
--
4059

  
4060
CREATE TABLE `~type._traits_06_list_distinct_taxa` (
4061
    taxonwithauthor varchar(255)
4062
);
4063

  
4064

  
4065
--
4066
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4067
--
4068

  
4069
CREATE TABLE `~type._traits_07_trait_value_and_units` (
4070
    trait varchar(255),
4071
    value varchar(255),
4072
    units varchar(255)
4073
);
4074

  
4075

  
4076
--
4077
-- Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
4078
--
4079

  
4080
CREATE TABLE `~type._traits_08_taxonname_trait_and_value` (
4081
    taxonwithauthor varchar(255),
4082
    trait varchar(255),
4083
    value varchar(255)
4084
);
4085

  
4086

  
4087

  
4088

  
4089
--
4090 4216
-- Name: address_id; Type: DEFAULT; Schema: public; Owner: -
4091 4217
--
4092 4218

  
trunk/schemas/vegbien.sql
1972 1972
SET search_path = public_validations, pg_catalog;
1973 1973

  
1974 1974
--
1975
-- Name: ~type._plots_01_count_of_projects; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1976
--
1977

  
1978
CREATE TABLE "~type._plots_01_count_of_projects" (
1979
    projects bigint
1980
);
1981

  
1982

  
1983
--
1984
-- Name: keys("~type._plots_01_count_of_projects"); Type: FUNCTION; Schema: public_validations; Owner: -
1985
--
1986

  
1987
CREATE FUNCTION keys(value "~type._plots_01_count_of_projects") RETURNS record
1988
    LANGUAGE sql IMMUTABLE
1989
    AS $$
1990
SELECT ROW()
1991
$$;
1992

  
1993

  
1994
--
1995
-- Name: ~type._plots_02_list_of_project_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1996
--
1997

  
1998
CREATE TABLE "~type._plots_02_list_of_project_names" (
1999
    project_name text
2000
);
2001

  
2002

  
2003
--
2004
-- Name: keys("~type._plots_02_list_of_project_names"); Type: FUNCTION; Schema: public_validations; Owner: -
2005
--
2006

  
2007
CREATE FUNCTION keys(value "~type._plots_02_list_of_project_names", OUT project_name text) RETURNS text
2008
    LANGUAGE sql IMMUTABLE
2009
    AS $_$
2010
SELECT ($1.project_name)
2011
$_$;
2012

  
2013

  
2014
--
2015
-- Name: ~type._plots_03_count_of_all_plots_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2016
--
2017

  
2018
CREATE TABLE "~type._plots_03_count_of_all_plots_in_this_source" (
2019
    plots bigint
2020
);
2021

  
2022

  
2023
--
2024
-- Name: keys("~type._plots_03_count_of_all_plots_in_this_source"); Type: FUNCTION; Schema: public_validations; Owner: -
2025
--
2026

  
2027
CREATE FUNCTION keys(value "~type._plots_03_count_of_all_plots_in_this_source") RETURNS record
2028
    LANGUAGE sql IMMUTABLE
2029
    AS $$
2030
SELECT ROW()
2031
$$;
2032

  
2033

  
2034
--
1975 2035
-- Name: ~type._plots_04_count_of_plots_in_each_project_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1976 2036
--
1977 2037

  
......
1985 2045
-- Name: keys("~type._plots_04_count_of_plots_in_each_project_in_this_source"); Type: FUNCTION; Schema: public_validations; Owner: -
1986 2046
--
1987 2047

  
1988
CREATE FUNCTION keys(value "~type._plots_04_count_of_plots_in_each_project_in_this_source") RETURNS record
2048
CREATE FUNCTION keys(value "~type._plots_04_count_of_plots_in_each_project_in_this_source", OUT project_name text) RETURNS text
1989 2049
    LANGUAGE sql IMMUTABLE
1990 2050
    AS $_$
1991
SELECT $1.project_name
2051
SELECT ($1.project_name)
1992 2052
$_$;
1993 2053

  
1994 2054

  
1995 2055
--
2056
-- Name: ~type._plots_05_list_of_plot_codes_by_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2057
--
2058

  
2059
CREATE TABLE "~type._plots_05_list_of_plot_codes_by_project" (
2060
    project_name text,
2061
    plot_code text
2062
);
2063

  
2064

  
2065
--
2066
-- Name: keys("~type._plots_05_list_of_plot_codes_by_project"); Type: FUNCTION; Schema: public_validations; Owner: -
2067
--
2068

  
2069
CREATE FUNCTION keys(value "~type._plots_05_list_of_plot_codes_by_project", OUT project_name text, OUT plot_code text) RETURNS record
2070
    LANGUAGE sql IMMUTABLE
2071
    AS $_$
2072
SELECT ROW($1.project_name, $1.plot_code)
2073
$_$;
2074

  
2075

  
2076
--
2077
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2078
--
2079

  
2080
CREATE TABLE "~type._plots_06_list_of_plots_with_stem_measurements" (
2081
    project_name text,
2082
    plot_code text
2083
);
2084

  
2085

  
2086
--
2087
-- Name: keys("~type._plots_06_list_of_plots_with_stem_measurements"); Type: FUNCTION; Schema: public_validations; Owner: -
2088
--
2089

  
2090
CREATE FUNCTION keys(value "~type._plots_06_list_of_plots_with_stem_measurements", OUT project_name text, OUT plot_code text) RETURNS record
2091
    LANGUAGE sql IMMUTABLE
2092
    AS $_$
2093
SELECT ROW($1.project_name, $1.plot_code)
2094
$_$;
2095

  
2096

  
2097
--
2098
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2099
--
2100

  
2101
CREATE TABLE "~type._plots_10_count_of_individuals_per_plot_in_each_project" (
2102
    project_name text,
2103
    plot_code text,
2104
    individuals bigint
2105
);
2106

  
2107

  
2108
--
2109
-- Name: keys("~type._plots_10_count_of_individuals_per_plot_in_each_project"); Type: FUNCTION; Schema: public_validations; Owner: -
2110
--
2111

  
2112
CREATE FUNCTION keys(value "~type._plots_10_count_of_individuals_per_plot_in_each_project", OUT project_name text, OUT plot_code text) RETURNS record
2113
    LANGUAGE sql IMMUTABLE
2114
    AS $_$
2115
SELECT ROW($1.project_name, $1.plot_code)
2116
$_$;
2117

  
2118

  
2119
--
2120
-- Name: ~type._plots_11_count_of_stems_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2121
--
2122

  
2123
CREATE TABLE "~type._plots_11_count_of_stems_per_plot_in_each_project" (
2124
    project_name text,
2125
    plot_code text,
2126
    stems bigint
2127
);
2128

  
2129

  
2130
--
2131
-- Name: keys("~type._plots_11_count_of_stems_per_plot_in_each_project"); Type: FUNCTION; Schema: public_validations; Owner: -
2132
--
2133

  
2134
CREATE FUNCTION keys(value "~type._plots_11_count_of_stems_per_plot_in_each_project", OUT project_name text, OUT plot_code text) RETURNS record
2135
    LANGUAGE sql IMMUTABLE
2136
    AS $_$
2137
SELECT ROW($1.project_name, $1.plot_code)
2138
$_$;
2139

  
2140

  
2141
--
2142
-- Name: ~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2143
--
2144

  
2145
CREATE TABLE "~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project" (
2146
    project_name text,
2147
    plot_code text,
2148
    taxa bigint
2149
);
2150

  
2151

  
2152
--
2153
-- Name: keys("~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project"); Type: FUNCTION; Schema: public_validations; Owner: -
2154
--
2155

  
2156
CREATE FUNCTION keys(value "~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project", OUT project_name text, OUT plot_code text) RETURNS record
2157
    LANGUAGE sql IMMUTABLE
2158
    AS $_$
2159
SELECT ROW($1.project_name, $1.plot_code)
2160
$_$;
2161

  
2162

  
2163
--
2164
-- Name: ~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2165
--
2166

  
2167
CREATE TABLE "~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_" (
2168
    project_name text,
2169
    plot_code text,
2170
    taxon text
2171
);
2172

  
2173

  
2174
--
2175
-- Name: keys("~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_"); Type: FUNCTION; Schema: public_validations; Owner: -
2176
--
2177

  
2178
CREATE FUNCTION keys(value "~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_", OUT project_name text, OUT plot_code text, OUT taxon text) RETURNS record
2179
    LANGUAGE sql IMMUTABLE
2180
    AS $_$
2181
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)
2182
$_$;
2183

  
2184

  
2185
--
2186
-- Name: ~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2187
--
2188

  
2189
CREATE TABLE "~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e" (
2190
    project_name text,
2191
    plot_code text,
2192
    taxon text,
2193
    individuals bigint
2194
);
2195

  
2196

  
2197
--
2198
-- Name: keys("~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e"); Type: FUNCTION; Schema: public_validations; Owner: -
2199
--
2200

  
2201
CREATE FUNCTION keys(value "~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e", OUT project_name text, OUT plot_code text, OUT taxon text) RETURNS record
2202
    LANGUAGE sql IMMUTABLE
2203
    AS $_$
2204
SELECT ROW($1.project_name, $1.plot_code, $1.taxon)
2205
$_$;
2206

  
2207

  
2208
--
2209
-- Name: ~type._plots_17_count_of_subplots_per_plot_for_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2210
--
2211

  
2212
CREATE TABLE "~type._plots_17_count_of_subplots_per_plot_for_each_project" (
2213
    project_name text,
2214
    plot_code text,
2215
    subplots bigint
2216
);
2217

  
2218

  
2219
--
2220
-- Name: keys("~type._plots_17_count_of_subplots_per_plot_for_each_project"); Type: FUNCTION; Schema: public_validations; Owner: -
2221
--
2222

  
2223
CREATE FUNCTION keys(value "~type._plots_17_count_of_subplots_per_plot_for_each_project", OUT project_name text, OUT plot_code text) RETURNS record
2224
    LANGUAGE sql IMMUTABLE
2225
    AS $_$
2226
SELECT ROW($1.project_name, $1.plot_code)
2227
$_$;
2228

  
2229

  
2230
--
2231
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2232
--
2233

  
2234
CREATE TABLE "~type._traits_01_count_records" (
2235
    "totalRecords" bigint
2236
);
2237

  
2238

  
2239
--
2240
-- Name: keys("~type._traits_01_count_records"); Type: FUNCTION; Schema: public_validations; Owner: -
2241
--
2242

  
2243
CREATE FUNCTION keys(value "~type._traits_01_count_records") RETURNS record
2244
    LANGUAGE sql IMMUTABLE
2245
    AS $$
2246
SELECT ROW()
2247
$$;
2248

  
2249

  
2250
--
2251
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2252
--
2253

  
2254
CREATE TABLE "~type._traits_02_count_trait_names" (
2255
    traits bigint
2256
);
2257

  
2258

  
2259
--
2260
-- Name: keys("~type._traits_02_count_trait_names"); Type: FUNCTION; Schema: public_validations; Owner: -
2261
--
2262

  
2263
CREATE FUNCTION keys(value "~type._traits_02_count_trait_names") RETURNS record
2264
    LANGUAGE sql IMMUTABLE
2265
    AS $$
2266
SELECT ROW()
2267
$$;
2268

  
2269

  
2270
--
2271
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2272
--
2273

  
2274
CREATE TABLE "~type._traits_03_list_trait_names" (
2275
    trait text
2276
);
2277

  
2278

  
2279
--
2280
-- Name: keys("~type._traits_03_list_trait_names"); Type: FUNCTION; Schema: public_validations; Owner: -
2281
--
2282

  
2283
CREATE FUNCTION keys(value "~type._traits_03_list_trait_names", OUT trait text) RETURNS text
2284
    LANGUAGE sql IMMUTABLE
2285
    AS $_$
2286
SELECT ($1.trait)
2287
$_$;
2288

  
2289

  
2290
--
1996 2291
-- Name: ~type._traits_04_count_records_per_trait; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
1997 2292
--
1998 2293

  
......
2006 2301
-- Name: keys("~type._traits_04_count_records_per_trait"); Type: FUNCTION; Schema: public_validations; Owner: -
2007 2302
--
2008 2303

  
2009
CREATE FUNCTION keys(value "~type._traits_04_count_records_per_trait") RETURNS record
2304
CREATE FUNCTION keys(value "~type._traits_04_count_records_per_trait", OUT trait text) RETURNS text
2010 2305
    LANGUAGE sql IMMUTABLE
2011 2306
    AS $_$
2012
SELECT $1.trait
2307
SELECT ($1.trait)
2013 2308
$_$;
2014 2309

  
2015 2310

  
2016 2311
--
2312
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2313
--
2314

  
2315
CREATE TABLE "~type._traits_05_count_taxa" (
2316
    taxa bigint
2317
);
2318

  
2319

  
2320
--
2321
-- Name: keys("~type._traits_05_count_taxa"); Type: FUNCTION; Schema: public_validations; Owner: -
2322
--
2323

  
2324
CREATE FUNCTION keys(value "~type._traits_05_count_taxa") RETURNS record
2325
    LANGUAGE sql IMMUTABLE
2326
    AS $$
2327
SELECT ROW()
2328
$$;
2329

  
2330

  
2331
--
2332
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2333
--
2334

  
2335
CREATE TABLE "~type._traits_06_list_distinct_taxa" (
2336
    taxonwithauthor text
2337
);
2338

  
2339

  
2340
--
2341
-- Name: keys("~type._traits_06_list_distinct_taxa"); Type: FUNCTION; Schema: public_validations; Owner: -
2342
--
2343

  
2344
CREATE FUNCTION keys(value "~type._traits_06_list_distinct_taxa", OUT taxonwithauthor text) RETURNS text
2345
    LANGUAGE sql IMMUTABLE
2346
    AS $_$
2347
SELECT ($1.taxonwithauthor)
2348
$_$;
2349

  
2350

  
2351
--
2352
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2353
--
2354

  
2355
CREATE TABLE "~type._traits_07_trait_value_and_units" (
2356
    trait text,
2357
    value text,
2358
    units text
2359
);
2360

  
2361

  
2362
--
2363
-- Name: keys("~type._traits_07_trait_value_and_units"); Type: FUNCTION; Schema: public_validations; Owner: -
2364
--
2365

  
2366
CREATE FUNCTION keys(value "~type._traits_07_trait_value_and_units", OUT trait text, OUT value text, OUT units text) RETURNS record
2367
    LANGUAGE sql IMMUTABLE
2368
    AS $_$
2369
SELECT ROW($1.trait, $1.value, $1.units)
2370
$_$;
2371

  
2372

  
2373
--
2374
-- Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
2375
--
2376

  
2377
CREATE TABLE "~type._traits_08_taxonname_trait_and_value" (
2378
    taxonwithauthor text,
2379
    trait text,
2380
    value text
2381
);
2382

  
2383

  
2384
--
2385
-- Name: keys("~type._traits_08_taxonname_trait_and_value"); Type: FUNCTION; Schema: public_validations; Owner: -
2386
--
2387

  
2388
CREATE FUNCTION keys(value "~type._traits_08_taxonname_trait_and_value", OUT taxonwithauthor text, OUT trait text, OUT value text) RETURNS record
2389
    LANGUAGE sql IMMUTABLE
2390
    AS $_$
2391
SELECT ROW($1.taxonwithauthor, $1.trait, $1.value)
2392
$_$;
2393

  
2394

  
2395
--
2017 2396
-- Name: query_view_relation_max_prefix_len(); Type: FUNCTION; Schema: public_validations; Owner: -
2018 2397
--
2019 2398

  
......
6415 6794
  ORDER BY taxonverbatim.taxonname;
6416 6795

  
6417 6796

  
6418
--
6419
-- Name: ~type._plots_01_count_of_projects; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6420
--
6421

  
6422
CREATE TABLE "~type._plots_01_count_of_projects" (
6423
    projects bigint
6424
);
6425

  
6426

  
6427
--
6428
-- Name: ~type._plots_02_list_of_project_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6429
--
6430

  
6431
CREATE TABLE "~type._plots_02_list_of_project_names" (
6432
    project_name text
6433
);
6434

  
6435

  
6436
--
6437
-- Name: ~type._plots_03_count_of_all_plots_in_this_source; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6438
--
6439

  
6440
CREATE TABLE "~type._plots_03_count_of_all_plots_in_this_source" (
6441
    plots bigint
6442
);
6443

  
6444

  
6445
--
6446
-- Name: ~type._plots_05_list_of_plot_codes_by_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6447
--
6448

  
6449
CREATE TABLE "~type._plots_05_list_of_plot_codes_by_project" (
6450
    project_name text,
6451
    plot_code text
6452
);
6453

  
6454

  
6455
--
6456
-- Name: ~type._plots_06_list_of_plots_with_stem_measurements; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6457
--
6458

  
6459
CREATE TABLE "~type._plots_06_list_of_plots_with_stem_measurements" (
6460
    project_name text,
6461
    plot_code text
6462
);
6463

  
6464

  
6465
--
6466
-- Name: ~type._plots_10_count_of_individuals_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6467
--
6468

  
6469
CREATE TABLE "~type._plots_10_count_of_individuals_per_plot_in_each_project" (
6470
    project_name text,
6471
    plot_code text,
6472
    individuals bigint
6473
);
6474

  
6475

  
6476
--
6477
-- Name: ~type._plots_11_count_of_stems_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6478
--
6479

  
6480
CREATE TABLE "~type._plots_11_count_of_stems_per_plot_in_each_project" (
6481
    project_name text,
6482
    plot_code text,
6483
    stems bigint
6484
);
6485

  
6486

  
6487
--
6488
-- Name: ~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6489
--
6490

  
6491
CREATE TABLE "~type._plots_12_count_of_verbatim_taxa_per_plot_in_each_project" (
6492
    project_name text,
6493
    plot_code text,
6494
    taxa bigint
6495
);
6496

  
6497

  
6498
--
6499
-- Name: ~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6500
--
6501

  
6502
CREATE TABLE "~type._plots_13_list_of_distinct_verbatim_taxa_in_each_plot_in_" (
6503
    project_name text,
6504
    plot_code text,
6505
    taxon text
6506
);
6507

  
6508

  
6509
--
6510
-- Name: ~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6511
--
6512

  
6513
CREATE TABLE "~type._plots_14_count_of_indiv_per_verbatim_taxon_per_plot_in_e" (
6514
    project_name text,
6515
    plot_code text,
6516
    taxon text,
6517
    individuals bigint
6518
);
6519

  
6520

  
6521
--
6522
-- Name: ~type._plots_17_count_of_subplots_per_plot_for_each_project; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6523
--
6524

  
6525
CREATE TABLE "~type._plots_17_count_of_subplots_per_plot_for_each_project" (
6526
    project_name text,
6527
    plot_code text,
6528
    subplots bigint
6529
);
6530

  
6531

  
6532
--
6533
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6534
--
6535

  
6536
CREATE TABLE "~type._traits_01_count_records" (
6537
    "totalRecords" bigint
6538
);
6539

  
6540

  
6541
--
6542
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6543
--
6544

  
6545
CREATE TABLE "~type._traits_02_count_trait_names" (
6546
    traits bigint
6547
);
6548

  
6549

  
6550
--
6551
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6552
--
6553

  
6554
CREATE TABLE "~type._traits_03_list_trait_names" (
6555
    trait text
6556
);
6557

  
6558

  
6559
--
6560
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6561
--
6562

  
6563
CREATE TABLE "~type._traits_05_count_taxa" (
6564
    taxa bigint
6565
);
6566

  
6567

  
6568
--
6569
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6570
--
6571

  
6572
CREATE TABLE "~type._traits_06_list_distinct_taxa" (
6573
    taxonwithauthor text
6574
);
6575

  
6576

  
6577
--
6578
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6579
--
6580

  
6581
CREATE TABLE "~type._traits_07_trait_value_and_units" (
6582
    trait text,
6583
    value text,
6584
    units text
6585
);
6586

  
6587

  
6588
--
6589
-- Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: 
6590
--
6591

  
6592
CREATE TABLE "~type._traits_08_taxonname_trait_and_value" (
6593
    taxonwithauthor text,
6594
    trait text,
6595
    value text
6596
);
6597

  
6598

  
6599 6797
SET search_path = public, pg_catalog;
6600 6798

  
6601 6799
--

Also available in: Unified diff