Revision 12383
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
1007 | 1007 |
|
1008 | 1008 |
|
1009 | 1009 |
|
1010 |
-- |
|
1011 |
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1012 |
-- |
|
1010 | 1013 |
|
1014 |
CREATE TABLE `~type._traits_01_count_records` ( |
|
1015 |
`totalRecords` varchar(255) |
|
1016 |
); |
|
1011 | 1017 |
|
1018 |
|
|
1012 | 1019 |
-- |
1020 |
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1021 |
-- |
|
1022 |
|
|
1023 |
CREATE TABLE `~type._traits_02_count_trait_names` ( |
|
1024 |
traits varchar(255) |
|
1025 |
); |
|
1026 |
|
|
1027 |
|
|
1028 |
-- |
|
1029 |
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1030 |
-- |
|
1031 |
|
|
1032 |
CREATE TABLE `~type._traits_03_list_trait_names` ( |
|
1033 |
trait varchar(255) |
|
1034 |
); |
|
1035 |
|
|
1036 |
|
|
1037 |
-- |
|
1038 |
-- Name: ~type._traits_04_count_records_per_trait; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1039 |
-- |
|
1040 |
|
|
1041 |
CREATE TABLE `~type._traits_04_count_records_per_trait` ( |
|
1042 |
trait varchar(255), |
|
1043 |
measurements varchar(255) |
|
1044 |
); |
|
1045 |
|
|
1046 |
|
|
1047 |
-- |
|
1048 |
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1049 |
-- |
|
1050 |
|
|
1051 |
CREATE TABLE `~type._traits_05_count_taxa` ( |
|
1052 |
taxa varchar(255) |
|
1053 |
); |
|
1054 |
|
|
1055 |
|
|
1056 |
-- |
|
1057 |
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1058 |
-- |
|
1059 |
|
|
1060 |
CREATE TABLE `~type._traits_06_list_distinct_taxa` ( |
|
1061 |
taxonwithauthor varchar(255) |
|
1062 |
); |
|
1063 |
|
|
1064 |
|
|
1065 |
-- |
|
1066 |
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1067 |
-- |
|
1068 |
|
|
1069 |
CREATE TABLE `~type._traits_07_trait_value_and_units` ( |
|
1070 |
trait varchar(255), |
|
1071 |
value varchar(255), |
|
1072 |
units varchar(255) |
|
1073 |
); |
|
1074 |
|
|
1075 |
|
|
1076 |
-- |
|
1077 |
-- Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
1078 |
-- |
|
1079 |
|
|
1080 |
CREATE TABLE `~type._traits_08_taxonname_trait_and_value` ( |
|
1081 |
taxonwithauthor varchar(255), |
|
1082 |
trait varchar(255), |
|
1083 |
value varchar(255) |
|
1084 |
); |
|
1085 |
|
|
1086 |
|
|
1087 |
|
|
1088 |
|
|
1089 |
-- |
|
1013 | 1090 |
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1014 | 1091 |
-- |
1015 | 1092 |
|
... | ... | |
6616 | 6693 |
|
6617 | 6694 |
|
6618 | 6695 |
|
6696 |
|
|
6697 |
|
|
6619 | 6698 |
-- |
6699 |
-- Data for Name: ~type._traits_01_count_records; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6700 |
-- |
|
6701 |
|
|
6702 |
|
|
6703 |
|
|
6704 |
-- |
|
6705 |
-- Data for Name: ~type._traits_02_count_trait_names; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6706 |
-- |
|
6707 |
|
|
6708 |
|
|
6709 |
|
|
6710 |
-- |
|
6711 |
-- Data for Name: ~type._traits_03_list_trait_names; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6712 |
-- |
|
6713 |
|
|
6714 |
|
|
6715 |
|
|
6716 |
-- |
|
6717 |
-- Data for Name: ~type._traits_04_count_records_per_trait; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6718 |
-- |
|
6719 |
|
|
6720 |
|
|
6721 |
|
|
6722 |
-- |
|
6723 |
-- Data for Name: ~type._traits_05_count_taxa; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6724 |
-- |
|
6725 |
|
|
6726 |
|
|
6727 |
|
|
6728 |
-- |
|
6729 |
-- Data for Name: ~type._traits_06_list_distinct_taxa; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6730 |
-- |
|
6731 |
|
|
6732 |
|
|
6733 |
|
|
6734 |
-- |
|
6735 |
-- Data for Name: ~type._traits_07_trait_value_and_units; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6736 |
-- |
|
6737 |
|
|
6738 |
|
|
6739 |
|
|
6740 |
-- |
|
6741 |
-- Data for Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
6742 |
-- |
|
6743 |
|
|
6744 |
|
|
6745 |
|
|
6746 |
|
|
6747 |
|
|
6748 |
-- |
|
6620 | 6749 |
-- Name: address_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
6621 | 6750 |
-- |
6622 | 6751 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
2020 | 2020 |
/* function option search_path is needed to limit the effects of |
2021 | 2021 |
`SET LOCAL search_path` (mk_set_search_path()) to the current function */ |
2022 | 2022 |
DECLARE |
2023 |
type_table text = util.qual_name(util.schema(in_view),
|
|
2024 |
'~type.'||util.name(in_view)); -- sort at end, away from the main tables
|
|
2023 |
type_table text = util.qual_name(util.schema(schema_anchor),
|
|
2024 |
'~type.'||util.name(in_view)); -- sort at end |
|
2025 | 2025 |
diff_table text = util.qual_name(util.schema(in_view), |
2026 | 2026 |
'_diff_'||util.name(in_view)); |
2027 | 2027 |
BEGIN |
... | ... | |
2304 | 2304 |
$_$; |
2305 | 2305 |
|
2306 | 2306 |
|
2307 |
-- |
|
2308 |
-- Name: ~type._traits_01_count_records; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2309 |
-- |
|
2310 |
|
|
2311 |
CREATE TABLE "~type._traits_01_count_records" ( |
|
2312 |
"totalRecords" bigint |
|
2313 |
); |
|
2314 |
|
|
2315 |
|
|
2316 |
-- |
|
2317 |
-- Name: ~type._traits_02_count_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2318 |
-- |
|
2319 |
|
|
2320 |
CREATE TABLE "~type._traits_02_count_trait_names" ( |
|
2321 |
traits bigint |
|
2322 |
); |
|
2323 |
|
|
2324 |
|
|
2325 |
-- |
|
2326 |
-- Name: ~type._traits_03_list_trait_names; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2327 |
-- |
|
2328 |
|
|
2329 |
CREATE TABLE "~type._traits_03_list_trait_names" ( |
|
2330 |
trait text |
|
2331 |
); |
|
2332 |
|
|
2333 |
|
|
2334 |
-- |
|
2335 |
-- Name: ~type._traits_04_count_records_per_trait; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2336 |
-- |
|
2337 |
|
|
2338 |
CREATE TABLE "~type._traits_04_count_records_per_trait" ( |
|
2339 |
trait text, |
|
2340 |
measurements bigint |
|
2341 |
); |
|
2342 |
|
|
2343 |
|
|
2344 |
-- |
|
2345 |
-- Name: ~type._traits_05_count_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2346 |
-- |
|
2347 |
|
|
2348 |
CREATE TABLE "~type._traits_05_count_taxa" ( |
|
2349 |
taxa bigint |
|
2350 |
); |
|
2351 |
|
|
2352 |
|
|
2353 |
-- |
|
2354 |
-- Name: ~type._traits_06_list_distinct_taxa; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2355 |
-- |
|
2356 |
|
|
2357 |
CREATE TABLE "~type._traits_06_list_distinct_taxa" ( |
|
2358 |
taxonwithauthor text |
|
2359 |
); |
|
2360 |
|
|
2361 |
|
|
2362 |
-- |
|
2363 |
-- Name: ~type._traits_07_trait_value_and_units; Type: TABLE; Schema: public_validations; Owner: -; Tablespace: |
|
2364 |
-- |
|
2365 |
|
|
2366 |
CREATE TABLE "~type._traits_07_trait_value_and_units" ( |
|
2367 |
trait text, |
|
2368 |
value text, |
|
2369 |
units text |
|
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 |
|
|
2307 | 2384 |
SET search_path = public, pg_catalog; |
2308 | 2385 |
|
2309 | 2386 |
-- |
... | ... | |
9014 | 9091 |
|
9015 | 9092 |
|
9016 | 9093 |
|
9094 |
SET search_path = public_validations, pg_catalog; |
|
9095 |
|
|
9017 | 9096 |
-- |
9097 |
-- Data for Name: ~type._traits_01_count_records; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9098 |
-- |
|
9099 |
|
|
9100 |
|
|
9101 |
|
|
9102 |
-- |
|
9103 |
-- Data for Name: ~type._traits_02_count_trait_names; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9104 |
-- |
|
9105 |
|
|
9106 |
|
|
9107 |
|
|
9108 |
-- |
|
9109 |
-- Data for Name: ~type._traits_03_list_trait_names; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9110 |
-- |
|
9111 |
|
|
9112 |
|
|
9113 |
|
|
9114 |
-- |
|
9115 |
-- Data for Name: ~type._traits_04_count_records_per_trait; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9116 |
-- |
|
9117 |
|
|
9118 |
|
|
9119 |
|
|
9120 |
-- |
|
9121 |
-- Data for Name: ~type._traits_05_count_taxa; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9122 |
-- |
|
9123 |
|
|
9124 |
|
|
9125 |
|
|
9126 |
-- |
|
9127 |
-- Data for Name: ~type._traits_06_list_distinct_taxa; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9128 |
-- |
|
9129 |
|
|
9130 |
|
|
9131 |
|
|
9132 |
-- |
|
9133 |
-- Data for Name: ~type._traits_07_trait_value_and_units; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9134 |
-- |
|
9135 |
|
|
9136 |
|
|
9137 |
|
|
9138 |
-- |
|
9139 |
-- Data for Name: ~type._traits_08_taxonname_trait_and_value; Type: TABLE DATA; Schema: public_validations; Owner: - |
|
9140 |
-- |
|
9141 |
|
|
9142 |
|
|
9143 |
|
|
9144 |
SET search_path = public, pg_catalog; |
|
9145 |
|
|
9146 |
-- |
|
9018 | 9147 |
-- Name: address_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
9019 | 9148 |
-- |
9020 | 9149 |
|
Also available in: Unified diff
schemas/vegbien.sql: public_validations.remake_diff_table(): put the type table in the public_validations schema to avoid cluttering up the datasource schema with internal tables