Project

General

Profile

« Previous | Next » 

Revision 12235

schemas/*.sql: make sure every COMMENT starts and ends on its own line, so that it appears correctly in the formats it's most likely to be read in (ie. in the DDL export, not the COMMENT edit box in pgAdmin)

View differences:

trunk/schemas/py_util.sql
22 22
-- Name: SCHEMA py_util; Type: COMMENT; Schema: -; Owner: bien
23 23
--
24 24

  
25
COMMENT ON SCHEMA py_util IS 'IMPORTANT: Functions must always return NULL in place of '''' (the empty string). This ensures that empty strings do not find their way into VegBIEN.';
25
COMMENT ON SCHEMA py_util IS '
26
IMPORTANT: Functions must always return NULL in place of '''' (the empty string). This ensures that empty strings do not find their way into VegBIEN.
27
';
26 28

  
27 29

  
28 30
SET search_path = py_util, pg_catalog;
trunk/schemas/util.sql
20 20
-- Name: SCHEMA util; Type: COMMENT; Schema: -; Owner: -
21 21
--
22 22

  
23
COMMENT ON SCHEMA util IS 'IMPORTANT: Functions must always return NULL in place of '''' (the empty string). This ensures that empty strings do not find their way into VegBIEN.
23
COMMENT ON SCHEMA util IS '
24
IMPORTANT: Functions must always return NULL in place of '''' (the empty string). This ensures that empty strings do not find their way into VegBIEN.
24 25

  
25
NOTE: IMMUTABLE SQL-language functions should never be declared STRICT, because this prevents them from being inlined. inlining can create a significant speed improvement (7x+), by avoiding function calls and enabling additional constant folding.';
26
NOTE: IMMUTABLE SQL-language functions should never be declared STRICT, because this prevents them from being inlined. inlining can create a significant speed improvement (7x+), by avoiding function calls and enabling additional constant folding.
27
';
26 28

  
27 29

  
28 30
SET search_path = util, pg_catalog;
......
104 106
-- Name: FUNCTION _and("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean); Type: COMMENT; Schema: util; Owner: -
105 107
--
106 108

  
107
COMMENT ON FUNCTION _and("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '_and() ignores NULL values, while AND combines them with the other values to potentially convert true to NULL. AND should be used with required fields, and _and() with optional fields.';
109
COMMENT ON FUNCTION _and("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '
110
_and() ignores NULL values, while AND combines them with the other values to potentially convert true to NULL. AND should be used with required fields, and _and() with optional fields.
111
';
108 112

  
109 113

  
110 114
--
......
499 503
-- Name: FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean); Type: COMMENT; Schema: util; Owner: -
500 504
--
501 505

  
502
COMMENT ON FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '_or() ignores NULL values, while OR combines them with the other values to potentially convert false to NULL. OR should be used with required fields, and _or() with optional fields.';
506
COMMENT ON FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '
507
_or() ignores NULL values, while OR combines them with the other values to potentially convert false to NULL. OR should be used with required fields, and _or() with optional fields.
508
';
503 509

  
504 510

  
505 511
--
......
546 552
-- Name: FUNCTION added_cols(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
547 553
--
548 554

  
549
COMMENT ON FUNCTION added_cols(table_ regclass, names regclass) IS 'gets table_''s added columns (all the columns not in the original data)';
555
COMMENT ON FUNCTION added_cols(table_ regclass, names regclass) IS '
556
gets table_''s added columns (all the columns not in the original data)
557
';
550 558

  
551 559

  
552 560
--
......
614 622
-- Name: FUNCTION array_length("array" anyarray, dimension integer); Type: COMMENT; Schema: util; Owner: -
615 623
--
616 624

  
617
COMMENT ON FUNCTION array_length("array" anyarray, dimension integer) IS 'returns 0 instead of NULL for empty arrays';
625
COMMENT ON FUNCTION array_length("array" anyarray, dimension integer) IS '
626
returns 0 instead of NULL for empty arrays
627
';
618 628

  
619 629

  
620 630
--
......
648 658
-- Name: FUNCTION cluster_once(table_ regclass, index regclass); Type: COMMENT; Schema: util; Owner: -
649 659
--
650 660

  
651
COMMENT ON FUNCTION cluster_once(table_ regclass, index regclass) IS 'idempotent';
661
COMMENT ON FUNCTION cluster_once(table_ regclass, index regclass) IS '
662
idempotent
663
';
652 664

  
653 665

  
654 666
--
......
729 741
-- Name: FUNCTION col_default_value(col col_ref, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
730 742
--
731 743

  
732
COMMENT ON FUNCTION col_default_value(col col_ref, ret_type_null anyelement) IS 'ret_type_null: NULL::ret_type';
744
COMMENT ON FUNCTION col_default_value(col col_ref, ret_type_null anyelement) IS '
745
ret_type_null: NULL::ret_type
746
';
733 747

  
734 748

  
735 749
--
......
862 876
-- Name: FUNCTION create_if_not_exists(sql text); Type: COMMENT; Schema: util; Owner: -
863 877
--
864 878

  
865
COMMENT ON FUNCTION create_if_not_exists(sql text) IS 'idempotent';
879
COMMENT ON FUNCTION create_if_not_exists(sql text) IS '
880
idempotent
881
';
866 882

  
867 883

  
868 884
--
......
885 901
-- Name: FUNCTION derived_cols(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
886 902
--
887 903

  
888
COMMENT ON FUNCTION derived_cols(table_ regclass, names regclass) IS 'gets table_''s derived columns (all the columns not in the names table)';
904
COMMENT ON FUNCTION derived_cols(table_ regclass, names regclass) IS '
905
gets table_''s derived columns (all the columns not in the names table)
906
';
889 907

  
890 908

  
891 909
--
......
916 934
-- Name: FUNCTION diff_cols(left_query text, right_query text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement); Type: COMMENT; Schema: util; Owner: -
917 935
--
918 936

  
919
COMMENT ON FUNCTION diff_cols(left_query text, right_query text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS 'col_type_null (*required*): NULL::col_type
937
COMMENT ON FUNCTION diff_cols(left_query text, right_query text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS '
938
col_type_null (*required*): NULL::col_type
920 939
usage:
921 940
SELECT * FROM util.diff_cols($$VALUES (''1''), (''2''), (''4'')$$, $$VALUES (''1''), (''3''), (''4'')$$, NULL::text)
922 941

  
......
942 961
-- Name: FUNCTION diff_views(left_view regclass, right_view regclass, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement); Type: COMMENT; Schema: util; Owner: -
943 962
--
944 963

  
945
COMMENT ON FUNCTION diff_views(left_view regclass, right_view regclass, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS 'col_type_null (*required*): NULL::col_type
964
COMMENT ON FUNCTION diff_views(left_view regclass, right_view regclass, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS '
965
col_type_null (*required*): NULL::col_type
946 966
usage:
947 967
SELECT * FROM util.diff_views(''"left_view"'', ''"right_view"'', NULL::text)
948 968
';
......
963 983
-- Name: FUNCTION do_optionally_ignore(sql text, ignore boolean); Type: COMMENT; Schema: util; Owner: -
964 984
--
965 985

  
966
COMMENT ON FUNCTION do_optionally_ignore(sql text, ignore boolean) IS 'idempotent';
986
COMMENT ON FUNCTION do_optionally_ignore(sql text, ignore boolean) IS '
987
idempotent
988
';
967 989

  
968 990

  
969 991
--
......
982 1004
-- Name: FUNCTION drop_column(col col_ref); Type: COMMENT; Schema: util; Owner: -
983 1005
--
984 1006

  
985
COMMENT ON FUNCTION drop_column(col col_ref) IS 'idempotent';
1007
COMMENT ON FUNCTION drop_column(col col_ref) IS '
1008
idempotent
1009
';
986 1010

  
987 1011

  
988 1012
--
......
1000 1024
-- Name: FUNCTION drop_table(table_ text); Type: COMMENT; Schema: util; Owner: -
1001 1025
--
1002 1026

  
1003
COMMENT ON FUNCTION drop_table(table_ text) IS 'idempotent';
1027
COMMENT ON FUNCTION drop_table(table_ text) IS '
1028
idempotent
1029
';
1004 1030

  
1005 1031

  
1006 1032
--
......
1018 1044
-- Name: FUNCTION drop_view(view_ text); Type: COMMENT; Schema: util; Owner: -
1019 1045
--
1020 1046

  
1021
COMMENT ON FUNCTION drop_view(view_ text) IS 'idempotent';
1047
COMMENT ON FUNCTION drop_view(view_ text) IS '
1048
idempotent
1049
';
1022 1050

  
1023 1051

  
1024 1052
--
......
1036 1064
-- Name: FUNCTION empty_array(elem_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1037 1065
--
1038 1066

  
1039
COMMENT ON FUNCTION empty_array(elem_type_null anyelement) IS 'constructs proper empty 1-dimensional array whose dimensions are not NULL ( ''{}''::text[] does not do this)';
1067
COMMENT ON FUNCTION empty_array(elem_type_null anyelement) IS '
1068
constructs proper empty 1-dimensional array whose dimensions are not NULL ( ''{}''::text[] does not do this)
1069
';
1040 1070

  
1041 1071

  
1042 1072
--
......
1093 1123
-- Name: FUNCTION eval2col_pair(sql text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement); Type: COMMENT; Schema: util; Owner: -
1094 1124
--
1095 1125

  
1096
COMMENT ON FUNCTION eval2col_pair(sql text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS 'col_type_null (*required*): NULL::col_type';
1126
COMMENT ON FUNCTION eval2col_pair(sql text, col_type_null anyelement, OUT left_ anyelement, OUT right_ anyelement) IS '
1127
col_type_null (*required*): NULL::col_type
1128
';
1097 1129

  
1098 1130

  
1099 1131
--
......
1114 1146
-- Name: FUNCTION eval2set(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1115 1147
--
1116 1148

  
1117
COMMENT ON FUNCTION eval2set(sql text, ret_type_null anyelement) IS 'ret_type_null: NULL::ret_type';
1149
COMMENT ON FUNCTION eval2set(sql text, ret_type_null anyelement) IS '
1150
ret_type_null: NULL::ret_type
1151
';
1118 1152

  
1119 1153

  
1120 1154
--
......
1138 1172
-- Name: FUNCTION eval2val(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1139 1173
--
1140 1174

  
1141
COMMENT ON FUNCTION eval2val(sql text, ret_type_null anyelement) IS 'ret_type_null: NULL::ret_type';
1175
COMMENT ON FUNCTION eval2val(sql text, ret_type_null anyelement) IS '
1176
ret_type_null: NULL::ret_type
1177
';
1142 1178

  
1143 1179

  
1144 1180
--
......
1156 1192
-- Name: FUNCTION eval_expr(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1157 1193
--
1158 1194

  
1159
COMMENT ON FUNCTION eval_expr(sql text, ret_type_null anyelement) IS 'ret_type_null: NULL::ret_type';
1195
COMMENT ON FUNCTION eval_expr(sql text, ret_type_null anyelement) IS '
1196
ret_type_null: NULL::ret_type
1197
';
1160 1198

  
1161 1199

  
1162 1200
--
......
1174 1212
-- Name: FUNCTION eval_expr_passthru(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1175 1213
--
1176 1214

  
1177
COMMENT ON FUNCTION eval_expr_passthru(sql text, ret_type_null anyelement) IS 'sql: can be NULL, which will be passed through
1178
ret_type_null: NULL::ret_type';
1215
COMMENT ON FUNCTION eval_expr_passthru(sql text, ret_type_null anyelement) IS '
1216
sql: can be NULL, which will be passed through
1217
ret_type_null: NULL::ret_type
1218
';
1179 1219

  
1180 1220

  
1181 1221
--
......
1258 1298
-- Name: FUNCTION explain2table(sql text, table_ regclass); Type: COMMENT; Schema: util; Owner: -
1259 1299
--
1260 1300

  
1261
COMMENT ON FUNCTION explain2table(sql text, table_ regclass) IS 'usage:
1301
COMMENT ON FUNCTION explain2table(sql text, table_ regclass) IS '
1302
usage:
1262 1303
PERFORM util.explain2table($$
1263 1304
query
1264
$$);';
1305
$$);
1306
';
1265 1307

  
1266 1308

  
1267 1309
--
......
1281 1323
-- Name: FUNCTION fix_array("array" anyarray); Type: COMMENT; Schema: util; Owner: -
1282 1324
--
1283 1325

  
1284
COMMENT ON FUNCTION fix_array("array" anyarray) IS 'ensures that an array will always have proper non-NULL dimensions';
1326
COMMENT ON FUNCTION fix_array("array" anyarray) IS '
1327
ensures that an array will always have proper non-NULL dimensions
1328
';
1285 1329

  
1286 1330

  
1287 1331
--
......
1313 1357
-- Name: FUNCTION force_recreate(cmd text, users text[]); Type: COMMENT; Schema: util; Owner: -
1314 1358
--
1315 1359

  
1316
COMMENT ON FUNCTION force_recreate(cmd text, users text[]) IS 'idempotent
1360
COMMENT ON FUNCTION force_recreate(cmd text, users text[]) IS '
1361
idempotent
1317 1362

  
1318
users: not necessary to provide this because it will be autopopulated';
1363
users: not necessary to provide this because it will be autopopulated
1364
';
1319 1365

  
1320 1366

  
1321 1367
--
......
1347 1393
-- Name: FUNCTION force_update_view(view_ text, query text); Type: COMMENT; Schema: util; Owner: -
1348 1394
--
1349 1395

  
1350
COMMENT ON FUNCTION force_update_view(view_ text, query text) IS 'idempotent';
1396
COMMENT ON FUNCTION force_update_view(view_ text, query text) IS '
1397
idempotent
1398
';
1351 1399

  
1352 1400

  
1353 1401
--
......
1387 1435
-- Name: FUNCTION hstore(keys text[], value text); Type: COMMENT; Schema: util; Owner: -
1388 1436
--
1389 1437

  
1390
COMMENT ON FUNCTION hstore(keys text[], value text) IS 'avoids repeating the same value for each key';
1438
COMMENT ON FUNCTION hstore(keys text[], value text) IS '
1439
avoids repeating the same value for each key
1440
';
1391 1441

  
1392 1442

  
1393 1443
--
......
1405 1455
-- Name: FUNCTION ifnull(value anyelement, null_ anyelement); Type: COMMENT; Schema: util; Owner: -
1406 1456
--
1407 1457

  
1408
COMMENT ON FUNCTION ifnull(value anyelement, null_ anyelement) IS 'equivalent to MySQL''s IFNULL() (Postgres auto-lowercases the name)';
1458
COMMENT ON FUNCTION ifnull(value anyelement, null_ anyelement) IS '
1459
equivalent to MySQL''s IFNULL() (Postgres auto-lowercases the name)
1460
';
1409 1461

  
1410 1462

  
1411 1463
--
......
1520 1572
-- Name: FUNCTION map_nulls(nulls text[], value anyelement); Type: COMMENT; Schema: util; Owner: -
1521 1573
--
1522 1574

  
1523
COMMENT ON FUNCTION map_nulls(nulls text[], value anyelement) IS 'due to dynamic inlining[1], this is just as fast as util._map() which it wraps[2].
1575
COMMENT ON FUNCTION map_nulls(nulls text[], value anyelement) IS '
1576
due to dynamic inlining[1], this is just as fast as util._map() which it wraps[2].
1524 1577

  
1525 1578
[1] inlining of function calls, which is different from constant folding
1526 1579
[2] _map()''s profiling query
......
1528 1581
and map_nulls()''s profiling query
1529 1582
SELECT util.map_nulls(array[1, 2, 3]::text[], v) FROM unnest(array_fill(1, array[100000])) f (v)
1530 1583
both take ~920 ms.
1531
also, /inputs/REMIB/Specimen/postprocess.sql > country takes the same amount of time (56000 ms) to build with map_nulls() as with a literal hstore.';
1584
also, /inputs/REMIB/Specimen/postprocess.sql > country takes the same amount of time (56000 ms) to build with map_nulls() as with a literal hstore.
1585
';
1532 1586

  
1533 1587

  
1534 1588
--
......
1560 1614
-- Name: FUNCTION materialize_query(table_ text, sql text); Type: COMMENT; Schema: util; Owner: -
1561 1615
--
1562 1616

  
1563
COMMENT ON FUNCTION materialize_query(table_ text, sql text) IS 'idempotent';
1617
COMMENT ON FUNCTION materialize_query(table_ text, sql text) IS '
1618
idempotent
1619
';
1564 1620

  
1565 1621

  
1566 1622
--
......
1578 1634
-- Name: FUNCTION materialize_view(table_ text, view_ regclass); Type: COMMENT; Schema: util; Owner: -
1579 1635
--
1580 1636

  
1581
COMMENT ON FUNCTION materialize_view(table_ text, view_ regclass) IS 'idempotent';
1637
COMMENT ON FUNCTION materialize_view(table_ text, view_ regclass) IS '
1638
idempotent
1639
';
1582 1640

  
1583 1641

  
1584 1642
--
......
1592 1650
ALTER TABLE $$||$1.table_||$$ ADD COLUMN $$
1593 1651
||quote_ident($1.name)||$$ $$||pg_typeof($2)||util.type_qual($2)||$$ DEFAULT $$
1594 1652
||quote_literal($2)||$$;
1595
COMMENT ON COLUMN $$||$1.table_||$$.$$||quote_ident($1.name)||$$ IS 'constant';
1653
COMMENT ON COLUMN $$||$1.table_||$$.$$||quote_ident($1.name)||$$ IS '
1654
constant
1655
';
1596 1656
$$)
1597 1657
$_$;
1598 1658

  
......
1601 1661
-- Name: FUNCTION mk_const_col(col col_ref, value anyelement); Type: COMMENT; Schema: util; Owner: -
1602 1662
--
1603 1663

  
1604
COMMENT ON FUNCTION mk_const_col(col col_ref, value anyelement) IS 'idempotent';
1664
COMMENT ON FUNCTION mk_const_col(col col_ref, value anyelement) IS '
1665
idempotent
1666
';
1605 1667

  
1606 1668

  
1607 1669
--
......
1628 1690
-- Name: FUNCTION mk_derived_col(col col_ref, expr text, overwrite boolean); Type: COMMENT; Schema: util; Owner: -
1629 1691
--
1630 1692

  
1631
COMMENT ON FUNCTION mk_derived_col(col col_ref, expr text, overwrite boolean) IS 'idempotent';
1693
COMMENT ON FUNCTION mk_derived_col(col col_ref, expr text, overwrite boolean) IS '
1694
idempotent
1695
';
1632 1696

  
1633 1697

  
1634 1698
--
......
1668 1732
-- Name: FUNCTION mk_source_col(table_ regclass); Type: COMMENT; Schema: util; Owner: -
1669 1733
--
1670 1734

  
1671
COMMENT ON FUNCTION mk_source_col(table_ regclass) IS 'idempotent';
1735
COMMENT ON FUNCTION mk_source_col(table_ regclass) IS '
1736
idempotent
1737
';
1672 1738

  
1673 1739

  
1674 1740
--
......
1780 1846
-- Name: FUNCTION mk_subset_by_row_num_no_sort_func(view_ regclass); Type: COMMENT; Schema: util; Owner: -
1781 1847
--
1782 1848

  
1783
COMMENT ON FUNCTION mk_subset_by_row_num_no_sort_func(view_ regclass) IS 'creates subset function which turns off enable_sort';
1849
COMMENT ON FUNCTION mk_subset_by_row_num_no_sort_func(view_ regclass) IS '
1850
creates subset function which turns off enable_sort
1851
';
1784 1852

  
1785 1853

  
1786 1854
--
......
1831 1899
-- Name: FUNCTION nulls_map(nulls text[]); Type: COMMENT; Schema: util; Owner: -
1832 1900
--
1833 1901

  
1834
COMMENT ON FUNCTION nulls_map(nulls text[]) IS 'for use with _map()';
1902
COMMENT ON FUNCTION nulls_map(nulls text[]) IS '
1903
for use with _map()
1904
';
1835 1905

  
1836 1906

  
1837 1907
--
......
1898 1968
-- Name: FUNCTION rename_cols(table_ regclass, renames anyelement); Type: COMMENT; Schema: util; Owner: -
1899 1969
--
1900 1970

  
1901
COMMENT ON FUNCTION rename_cols(table_ regclass, renames anyelement) IS 'idempotent';
1971
COMMENT ON FUNCTION rename_cols(table_ regclass, renames anyelement) IS '
1972
idempotent
1973
';
1902 1974

  
1903 1975

  
1904 1976
--
......
1918 1990
-- Name: FUNCTION reset_col_names(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
1919 1991
--
1920 1992

  
1921
COMMENT ON FUNCTION reset_col_names(table_ regclass, names regclass) IS 'idempotent.
1922
alters the names table, so it will need to be repopulated after running this function.';
1993
COMMENT ON FUNCTION reset_col_names(table_ regclass, names regclass) IS '
1994
idempotent.
1995
alters the names table, so it will need to be repopulated after running this function.
1996
';
1923 1997

  
1924 1998

  
1925 1999
--
......
2006 2080
-- Name: FUNCTION schema_bundle_get_schemas(schema_bundle text); Type: COMMENT; Schema: util; Owner: -
2007 2081
--
2008 2082

  
2009
COMMENT ON FUNCTION schema_bundle_get_schemas(schema_bundle text) IS 'a schema bundle is a group of schemas with a common prefix';
2083
COMMENT ON FUNCTION schema_bundle_get_schemas(schema_bundle text) IS '
2084
a schema bundle is a group of schemas with a common prefix
2085
';
2010 2086

  
2011 2087

  
2012 2088
--
......
2140 2216
-- Name: FUNCTION set_col_names(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
2141 2217
--
2142 2218

  
2143
COMMENT ON FUNCTION set_col_names(table_ regclass, names regclass) IS 'idempotent';
2219
COMMENT ON FUNCTION set_col_names(table_ regclass, names regclass) IS '
2220
idempotent
2221
';
2144 2222

  
2145 2223

  
2146 2224
--
......
2179 2257
-- Name: FUNCTION set_col_names_with_metadata(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
2180 2258
--
2181 2259

  
2182
COMMENT ON FUNCTION set_col_names_with_metadata(table_ regclass, names regclass) IS 'idempotent.
2183
the metadata mappings must be *last* in the names table.';
2260
COMMENT ON FUNCTION set_col_names_with_metadata(table_ regclass, names regclass) IS '
2261
idempotent.
2262
the metadata mappings must be *last* in the names table.
2263
';
2184 2264

  
2185 2265

  
2186 2266
--
......
2218 2298
-- Name: FUNCTION set_col_types(table_ regclass, col_casts col_cast[]); Type: COMMENT; Schema: util; Owner: -
2219 2299
--
2220 2300

  
2221
COMMENT ON FUNCTION set_col_types(table_ regclass, col_casts col_cast[]) IS 'idempotent';
2301
COMMENT ON FUNCTION set_col_types(table_ regclass, col_casts col_cast[]) IS '
2302
idempotent
2303
';
2222 2304

  
2223 2305

  
2224 2306
--
......
2284 2366
-- Name: FUNCTION table_flag__get(table_ regclass, flag text); Type: COMMENT; Schema: util; Owner: -
2285 2367
--
2286 2368

  
2287
COMMENT ON FUNCTION table_flag__get(table_ regclass, flag text) IS 'gets whether a status flag is set by the presence of a table constraint';
2369
COMMENT ON FUNCTION table_flag__get(table_ regclass, flag text) IS '
2370
gets whether a status flag is set by the presence of a table constraint
2371
';
2288 2372

  
2289 2373

  
2290 2374
--
......
2303 2387
-- Name: FUNCTION table_flag__set(table_ regclass, flag text); Type: COMMENT; Schema: util; Owner: -
2304 2388
--
2305 2389

  
2306
COMMENT ON FUNCTION table_flag__set(table_ regclass, flag text) IS 'stores a status flag by the presence of a table constraint.
2307
idempotent.';
2390
COMMENT ON FUNCTION table_flag__set(table_ regclass, flag text) IS '
2391
stores a status flag by the presence of a table constraint.
2392
idempotent.
2393
';
2308 2394

  
2309 2395

  
2310 2396
--
......
2333 2419
-- Name: FUNCTION table_nulls_mapped__get(table_ regclass); Type: COMMENT; Schema: util; Owner: -
2334 2420
--
2335 2421

  
2336
COMMENT ON FUNCTION table_nulls_mapped__get(table_ regclass) IS 'gets whether a table''s NULL-equivalent strings have been replaced with NULL';
2422
COMMENT ON FUNCTION table_nulls_mapped__get(table_ regclass) IS '
2423
gets whether a table''s NULL-equivalent strings have been replaced with NULL
2424
';
2337 2425

  
2338 2426

  
2339 2427
--
......
2351 2439
-- Name: FUNCTION table_nulls_mapped__set(table_ regclass); Type: COMMENT; Schema: util; Owner: -
2352 2440
--
2353 2441

  
2354
COMMENT ON FUNCTION table_nulls_mapped__set(table_ regclass) IS 'sets that a table''s NULL-equivalent strings have been replaced with NULL.
2355
idempotent.';
2442
COMMENT ON FUNCTION table_nulls_mapped__set(table_ regclass) IS '
2443
sets that a table''s NULL-equivalent strings have been replaced with NULL.
2444
idempotent.
2445
';
2356 2446

  
2357 2447

  
2358 2448
--
......
2391 2481
-- Name: FUNCTION to_global_col_names(table_ regclass); Type: COMMENT; Schema: util; Owner: -
2392 2482
--
2393 2483

  
2394
COMMENT ON FUNCTION to_global_col_names(table_ regclass) IS 'idempotent';
2484
COMMENT ON FUNCTION to_global_col_names(table_ regclass) IS '
2485
idempotent
2486
';
2395 2487

  
2396 2488

  
2397 2489
--
......
2410 2502
-- Name: FUNCTION "trim"(table_ regclass, names regclass); Type: COMMENT; Schema: util; Owner: -
2411 2503
--
2412 2504

  
2413
COMMENT ON FUNCTION "trim"(table_ regclass, names regclass) IS 'trims table_ to include only columns in the original data.
2414
idempotent.';
2505
COMMENT ON FUNCTION "trim"(table_ regclass, names regclass) IS '
2506
trims table_ to include only columns in the original data.
2507
idempotent.
2508
';
2415 2509

  
2416 2510

  
2417 2511
--
......
2431 2525
-- Name: FUNCTION truncate(table_ regclass); Type: COMMENT; Schema: util; Owner: -
2432 2526
--
2433 2527

  
2434
COMMENT ON FUNCTION truncate(table_ regclass) IS 'idempotent';
2528
COMMENT ON FUNCTION truncate(table_ regclass) IS '
2529
idempotent
2530
';
2435 2531

  
2436 2532

  
2437 2533
--
......
2455 2551
-- Name: FUNCTION try_create(sql text); Type: COMMENT; Schema: util; Owner: -
2456 2552
--
2457 2553

  
2458
COMMENT ON FUNCTION try_create(sql text) IS 'idempotent';
2554
COMMENT ON FUNCTION try_create(sql text) IS '
2555
idempotent
2556
';
2459 2557

  
2460 2558

  
2461 2559
--
......
2473 2571
-- Name: FUNCTION try_mk_derived_col(col col_ref, expr text); Type: COMMENT; Schema: util; Owner: -
2474 2572
--
2475 2573

  
2476
COMMENT ON FUNCTION try_mk_derived_col(col col_ref, expr text) IS 'idempotent';
2574
COMMENT ON FUNCTION try_mk_derived_col(col col_ref, expr text) IS '
2575
idempotent
2576
';
2477 2577

  
2478 2578

  
2479 2579
--
......
2491 2591
-- Name: FUNCTION type_qual(value anyelement); Type: COMMENT; Schema: util; Owner: -
2492 2592
--
2493 2593

  
2494
COMMENT ON FUNCTION type_qual(value anyelement) IS 'a type''s NOT NULL qualifier';
2594
COMMENT ON FUNCTION type_qual(value anyelement) IS '
2595
a type''s NOT NULL qualifier
2596
';
2495 2597

  
2496 2598

  
2497 2599
--
......
2510 2612
-- Name: FUNCTION type_qual_name(type regtype); Type: COMMENT; Schema: util; Owner: -
2511 2613
--
2512 2614

  
2513
COMMENT ON FUNCTION type_qual_name(type regtype) IS 'a type''s schema-qualified name';
2615
COMMENT ON FUNCTION type_qual_name(type regtype) IS '
2616
a type''s schema-qualified name
2617
';
2514 2618

  
2515 2619

  
2516 2620
--
......
2545 2649
-- Name: AGGREGATE all_same(anyelement); Type: COMMENT; Schema: util; Owner: -
2546 2650
--
2547 2651

  
2548
COMMENT ON AGGREGATE all_same(anyelement) IS 'includes NULLs in comparison';
2652
COMMENT ON AGGREGATE all_same(anyelement) IS '
2653
includes NULLs in comparison
2654
';
2549 2655

  
2550 2656

  
2551 2657
--
......
2584 2690
-- Name: OPERATOR => (text[], text); Type: COMMENT; Schema: util; Owner: -
2585 2691
--
2586 2692

  
2587
COMMENT ON OPERATOR => (text[], text) IS 'usage: array[''key1'', ...]::text[] => ''value''';
2693
COMMENT ON OPERATOR => (text[], text) IS '
2694
usage: array[''key1'', ...]::text[] => ''value''
2695
';
2588 2696

  
2589 2697

  
2590 2698
--
......
2624 2732
-- Name: OPERATOR ||% (text, text); Type: COMMENT; Schema: util; Owner: -
2625 2733
--
2626 2734

  
2627
COMMENT ON OPERATOR ||% (text, text) IS '% indicates an identifier, as in Perl hashes and one of the x86 assembler syntaxes for registers';
2735
COMMENT ON OPERATOR ||% (text, text) IS '
2736
% indicates an identifier, as in Perl hashes and one of the x86 assembler syntaxes for registers
2737
';
2628 2738

  
2629 2739

  
2630 2740
--
trunk/schemas/vegbien.sql
20 20
-- Name: SCHEMA public_validations; Type: COMMENT; Schema: -; Owner: -
21 21
--
22 22

  
23
COMMENT ON SCHEMA public_validations IS 'aggregating validations queries';
23
COMMENT ON SCHEMA public_validations IS '
24
aggregating validations queries
25
';
24 26

  
25 27

  
26 28
SET search_path = public, pg_catalog;
......
52 54
-- Name: TYPE coordinatesource; Type: COMMENT; Schema: public; Owner: -
53 55
--
54 56

  
55
COMMENT ON TYPE coordinatesource IS 'From <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore_data_dictionary#coordinateSource>';
57
COMMENT ON TYPE coordinatesource IS '
58
From <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore_data_dictionary#coordinateSource>
59
';
56 60

  
57 61

  
58 62
--
......
73 77
-- Name: TYPE establishmentmeans_dwc; Type: COMMENT; Schema: public; Owner: -
74 78
--
75 79

  
76
COMMENT ON TYPE establishmentmeans_dwc IS 'See <http://rs.tdwg.org/dwc/terms/#establishmentMeans>';
80
COMMENT ON TYPE establishmentmeans_dwc IS '
81
See <http://rs.tdwg.org/dwc/terms/#establishmentMeans>
82
';
77 83

  
78 84

  
79 85
--
......
160 166
-- Name: TYPE placerank; Type: COMMENT; Schema: public; Owner: -
161 167
--
162 168

  
163
COMMENT ON TYPE placerank IS 'county = parish, canton
169
COMMENT ON TYPE placerank IS '
170
county = parish, canton
164 171
municipality = city
165 172

  
166
From <http://rs.tdwg.org/dwc/terms/#dcindex#dcterms:Location>, <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1415&entity=dba_fielddescription&params=1415>';
173
From <http://rs.tdwg.org/dwc/terms/#dcindex#dcterms:Location>, <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1415&entity=dba_fielddescription&params=1415>
174
';
167 175

  
168 176

  
169 177
--
......
253 261
-- Name: TYPE taxonrank; Type: COMMENT; Schema: public; Owner: -
254 262
--
255 263

  
256
COMMENT ON TYPE taxonrank IS 'From <http://www.tdwg.org/standards/117/download/>';
264
COMMENT ON TYPE taxonrank IS '
265
From <http://www.tdwg.org/standards/117/download/>
266
';
257 267

  
258 268

  
259 269
--
......
316 326
-- Name: TYPE role; Type: COMMENT; Schema: public; Owner: -
317 327
--
318 328

  
319
COMMENT ON TYPE role IS 'From <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1331&entity=dba_fielddescription&params=1331>, <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=projectcontributor&entity=dba_tabledescription&where=where_tablename#ROLE_ID>, and misc terms.';
329
COMMENT ON TYPE role IS '
330
From <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1331&entity=dba_fielddescription&params=1331>, <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=projectcontributor&entity=dba_tabledescription&where=where_tablename#ROLE_ID>, and misc terms.
331
';
320 332

  
321 333

  
322 334
--
......
348 360
-- Name: TYPE sourcetype; Type: COMMENT; Schema: public; Owner: -
349 361
--
350 362

  
351
COMMENT ON TYPE sourcetype IS 'From <https://projects.nceas.ucsb.edu/nceas/attachments/download/428/bien_web_datasource_schema.sql>, <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1300&entity=dba_fielddescription&params=1300>, <http://vegbiendev.nceas.ucsb.edu/phppgadmin/display.php?server=localhost%3A5432%3Aallow&database=vegbien&schema=VegBank&table=source&subject=table#sourcetype>';
363
COMMENT ON TYPE sourcetype IS '
364
From <https://projects.nceas.ucsb.edu/nceas/attachments/download/428/bien_web_datasource_schema.sql>, <http://vegbank.org/vegbank/views/dba_fielddescription_detail.jsp?view=detail&wparam=1300&entity=dba_fielddescription&params=1300>, <http://vegbiendev.nceas.ucsb.edu/phppgadmin/display.php?server=localhost%3A5432%3Aallow&database=vegbien&schema=VegBank&table=source&subject=table#sourcetype>
365
';
352 366

  
353 367

  
354 368
--
......
386 400
-- Name: TYPE taxonclass; Type: COMMENT; Schema: public; Owner: -
387 401
--
388 402

  
389
COMMENT ON TYPE taxonclass IS '= growthform + establishmentmeans_dwc + some others';
403
COMMENT ON TYPE taxonclass IS '
404
= growthform + establishmentmeans_dwc + some others
405
';
390 406

  
391 407

  
392 408
--
......
406 422
-- Name: TYPE taxonomic_status; Type: COMMENT; Schema: public; Owner: -
407 423
--
408 424

  
409
COMMENT ON TYPE taxonomic_status IS 'See <http://tnrs.iplantcollaborative.org/instructions.html#Status>';
425
COMMENT ON TYPE taxonomic_status IS '
426
See <http://tnrs.iplantcollaborative.org/instructions.html#Status>
427
';
410 428

  
411 429

  
412 430
--
......
599 617
-- Name: FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean); Type: COMMENT; Schema: public; Owner: -
600 618
--
601 619

  
602
COMMENT ON FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '_or() ignores NULL values, while OR combines them with the other values to potentially convert false to NULL. OR should be used with required fields, and _or() with optional fields.';
620
COMMENT ON FUNCTION _or("0" boolean, "1" boolean, "2" boolean, "3" boolean, "4" boolean) IS '
621
_or() ignores NULL values, while OR combines them with the other values to potentially convert false to NULL. OR should be used with required fields, and _or() with optional fields.
622
';
603 623

  
604 624

  
605 625
--
......
729 749
-- Name: FUNCTION datasource_publish(datasource text, schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
730 750
--
731 751

  
732
COMMENT ON FUNCTION datasource_publish(datasource text, schema_null anyelement) IS 'secure against renamings of the public schema.
752
COMMENT ON FUNCTION datasource_publish(datasource text, schema_null anyelement) IS '
753
secure against renamings of the public schema.
733 754

  
734 755
schema_null: identifies which schema''s tables to use. the default value is usually fine.
735 756
';
......
751 772
-- Name: FUNCTION datasource_rename(old text, new text, schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
752 773
--
753 774

  
754
COMMENT ON FUNCTION datasource_rename(old text, new text, schema_null anyelement) IS 'secure against renamings of the public schema.
775
COMMENT ON FUNCTION datasource_rename(old text, new text, schema_null anyelement) IS '
776
secure against renamings of the public schema.
755 777

  
756 778
schema_null: identifies which schema''s tables to use. the default value is usually fine.
757 779
';
......
773 795
-- Name: FUNCTION datasource_rm(datasource text, schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
774 796
--
775 797

  
776
COMMENT ON FUNCTION datasource_rm(datasource text, schema_null anyelement) IS 'secure against renamings of the public schema.
798
COMMENT ON FUNCTION datasource_rm(datasource text, schema_null anyelement) IS '
799
secure against renamings of the public schema.
777 800

  
778 801
schema_null: identifies which schema''s tables to use. the default value is usually fine.
779 802

  
......
805 828
-- Name: FUNCTION datasource_unpublish(datasource text, schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
806 829
--
807 830

  
808
COMMENT ON FUNCTION datasource_unpublish(datasource text, schema_null anyelement) IS 'secure against renamings of the public schema.
831
COMMENT ON FUNCTION datasource_unpublish(datasource text, schema_null anyelement) IS '
832
secure against renamings of the public schema.
809 833

  
810 834
schema_null: identifies which schema''s tables to use. the default value is usually fine.
811 835
';
......
850 874
-- Name: FUNCTION location__pull_forward_from_parent(); Type: COMMENT; Schema: public; Owner: -
851 875
--
852 876

  
853
COMMENT ON FUNCTION location__pull_forward_from_parent() IS 'see wiki.vegpath.org/Pull-forward';
877
COMMENT ON FUNCTION location__pull_forward_from_parent() IS '
878
see wiki.vegpath.org/Pull-forward
879
';
854 880

  
855 881

  
856 882
--
......
874 900
-- Name: FUNCTION location_set_top_plot(); Type: COMMENT; Schema: public; Owner: -
875 901
--
876 902

  
877
COMMENT ON FUNCTION location_set_top_plot() IS 'see wiki.vegpath.org/Pull-forward';
903
COMMENT ON FUNCTION location_set_top_plot() IS '
904
see wiki.vegpath.org/Pull-forward
905
';
878 906

  
879 907

  
880 908
--
......
958 986
-- Name: FUNCTION locationevent_pull_forward_from_parent(); Type: COMMENT; Schema: public; Owner: -
959 987
--
960 988

  
961
COMMENT ON FUNCTION locationevent_pull_forward_from_parent() IS 'see wiki.vegpath.org/Pull-forward';
989
COMMENT ON FUNCTION locationevent_pull_forward_from_parent() IS '
990
see wiki.vegpath.org/Pull-forward
991
';
962 992

  
963 993

  
964 994
--
......
984 1014
-- Name: FUNCTION locationevent_pull_forward_from_parent_for_stratum(); Type: COMMENT; Schema: public; Owner: -
985 1015
--
986 1016

  
987
COMMENT ON FUNCTION locationevent_pull_forward_from_parent_for_stratum() IS 'see wiki.vegpath.org/Pull-forward';
1017
COMMENT ON FUNCTION locationevent_pull_forward_from_parent_for_stratum() IS '
1018
see wiki.vegpath.org/Pull-forward
1019
';
988 1020

  
989 1021

  
990 1022
--
......
1118 1150
-- Name: TABLE place; Type: COMMENT; Schema: public; Owner: -
1119 1151
--
1120 1152

  
1121
COMMENT ON TABLE place IS 'The full path to a place. Can be either verbatim or accepted. For accepted names, points to the identified place.
1153
COMMENT ON TABLE place IS '
1154
The full path to a place. Can be either verbatim or accepted. For accepted names, points to the identified place.
1122 1155

  
1123
To use a custom hierarchy of placenames with no explicit column, point to the lowest-rank placename in placename_id.';
1156
To use a custom hierarchy of placenames with no explicit column, point to the lowest-rank placename in placename_id.
1157
';
1124 1158

  
1125 1159

  
1126 1160
--
1127 1161
-- Name: COLUMN place.matched_place_id; Type: COMMENT; Schema: public; Owner: -
1128 1162
--
1129 1163

  
1130
COMMENT ON COLUMN place.matched_place_id IS 'The closest match to this place. Places should be linked in a three-level hierarchy of datasource place -> verbatim place -> accepted place.
1164
COMMENT ON COLUMN place.matched_place_id IS '
1165
The closest match to this place. Places should be linked in a three-level hierarchy of datasource place -> verbatim place -> accepted place.
1131 1166

  
1132
An accepted place should point to itself in this field. This will happen automatically by setting it to the special value 0.';
1167
An accepted place should point to itself in this field. This will happen automatically by setting it to the special value 0.
1168
';
1133 1169

  
1134 1170

  
1135 1171
--
......
1292 1328
-- Name: FUNCTION project_contributors(project_id integer); Type: COMMENT; Schema: public; Owner: -
1293 1329
--
1294 1330

  
1295
COMMENT ON FUNCTION project_contributors(project_id integer) IS 'usage: array(SELECT project_contributors(...))';
1331
COMMENT ON FUNCTION project_contributors(project_id integer) IS '
1332
usage: array(SELECT project_contributors(...))
1333
';
1296 1334

  
1297 1335

  
1298 1336
--
......
1324 1362
-- Name: FUNCTION publish(schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
1325 1363
--
1326 1364

  
1327
COMMENT ON FUNCTION publish(schema_null anyelement) IS 'publishes this schema.
1365
COMMENT ON FUNCTION publish(schema_null anyelement) IS '
1366
publishes this schema.
1328 1367

  
1329 1368
usage: SELECT public_schema.publish()
1330 1369

  
......
1354 1393
-- Name: FUNCTION rm(schema_null anyelement); Type: COMMENT; Schema: public; Owner: -
1355 1394
--
1356 1395

  
1357
COMMENT ON FUNCTION rm(schema_null anyelement) IS 'deletes this schema.
1396
COMMENT ON FUNCTION rm(schema_null anyelement) IS '
1397
deletes this schema.
1358 1398

  
1359 1399
usage: SELECT public_schema.rm()
1360 1400

  
......
1631 1671
-- Name: TABLE taxonlabel; Type: COMMENT; Schema: public; Owner: -
1632 1672
--
1633 1673

  
1634
COMMENT ON TABLE taxonlabel IS 'A taxon label defined by an entity. Can be at any level in the taxonomic hierarchy. Can be either verbatim or accepted.
1674
COMMENT ON TABLE taxonlabel IS '
1675
A taxon label defined by an entity. Can be at any level in the taxonomic hierarchy. Can be either verbatim or accepted.
1635 1676

  
1636 1677
"A taxon (plural: taxa) is a group of one (or more) populations of organism(s), which a taxonomist adjudges to be a unit" (http://en.wikipedia.org/wiki/Taxon)
1637 1678

  
1638 1679
Note that taxonepithet stores only one rank (e.g. family) of the full taxonomic name. The higher-level ranks are stored in the taxon label''s chain of parent_id ancestors.
1639 1680

  
1640
Equivalent to VegBank''s plantConcept and plantName tables, plus plantParent_ID and plantLevel from plantStatus.';
1681
Equivalent to VegBank''s plantConcept and plantName tables, plus plantParent_ID and plantLevel from plantStatus.
1682
';
1641 1683

  
1642 1684

  
1643 1685
--
1644 1686
-- Name: COLUMN taxonlabel.source_id; Type: COMMENT; Schema: public; Owner: -
1645 1687
--
1646 1688

  
1647
COMMENT ON COLUMN taxonlabel.source_id IS 'The entity that created the taxon label.';
1689
COMMENT ON COLUMN taxonlabel.source_id IS '
1690
The entity that created the taxon label.
1691
';
1648 1692

  
1649 1693

  
1650 1694
--
1651 1695
-- Name: COLUMN taxonlabel.sourceaccessioncode; Type: COMMENT; Schema: public; Owner: -
1652 1696
--
1653 1697

  
1654
COMMENT ON COLUMN taxonlabel.sourceaccessioncode IS 'The datasource''s identifier for the taxonlabel.';
1698
COMMENT ON COLUMN taxonlabel.sourceaccessioncode IS '
1699
The datasource''s identifier for the taxonlabel.
1700
';
1655 1701

  
1656 1702

  
1657 1703
--
1658 1704
-- Name: COLUMN taxonlabel.canon_label_id; Type: COMMENT; Schema: public; Owner: -
1659 1705
--
1660 1706

  
1661
COMMENT ON COLUMN taxonlabel.canon_label_id IS 'The canonical taxonlabel for this taxonlabel.';
1707
COMMENT ON COLUMN taxonlabel.canon_label_id IS '
1708
The canonical taxonlabel for this taxonlabel.
1709
';
1662 1710

  
1663 1711

  
1664 1712
--
1665 1713
-- Name: COLUMN taxonlabel.matched_label_id; Type: COMMENT; Schema: public; Owner: -
1666 1714
--
1667 1715

  
1668
COMMENT ON COLUMN taxonlabel.matched_label_id IS 'The taxonlabel containing the closest match to this taxonlabel. taxonlabels should be linked in a four-level hierarchy of datasource label -> parsed label -> matched label -> accepted label. A previously-accepted name''s label should be further linked to the synonym that has replaced it.
1716
COMMENT ON COLUMN taxonlabel.matched_label_id IS '
1717
The taxonlabel containing the closest match to this taxonlabel. taxonlabels should be linked in a four-level hierarchy of datasource label -> parsed label -> matched label -> accepted label. A previously-accepted name''s label should be further linked to the synonym that has replaced it.
1669 1718

  
1670 1719
To indicate a synonym between taxonlabels of different sources, choose one taxonlabel to be authoritative and point the other taxonlabel to it using this field.
1671 1720

  
1672
An accepted name should point to itself in this field. This will happen automatically by setting it to the special value 0.';
1721
An accepted name should point to itself in this field. This will happen automatically by setting it to the special value 0.
1722
';
1673 1723

  
1674 1724

  
1675 1725
--
1676 1726
-- Name: COLUMN taxonlabel.parent_id; Type: COMMENT; Schema: public; Owner: -
1677 1727
--
1678 1728

  
1679
COMMENT ON COLUMN taxonlabel.parent_id IS 'The parent taxonlabel. Note that while a taxon *name* may have multiple parents, a taxonlabel *instance* has only one, based on the creator''s opinion of where that taxonlabel goes in the taxonomic hierarchy.';
1729
COMMENT ON COLUMN taxonlabel.parent_id IS '
1730
The parent taxonlabel. Note that while a taxon *name* may have multiple parents, a taxonlabel *instance* has only one, based on the creator''s opinion of where that taxonlabel goes in the taxonomic hierarchy.
1731
';
1680 1732

  
1681 1733

  
1682 1734
--
1683 1735
-- Name: COLUMN taxonlabel.taxonepithet; Type: COMMENT; Schema: public; Owner: -
1684 1736
--
1685 1737

  
1686
COMMENT ON COLUMN taxonlabel.taxonepithet IS 'The epithet of the taxon within its parent taxon. This is the lowest-rank portion of this taxonlabel''s full taxonomic name, if it has one.';
1738
COMMENT ON COLUMN taxonlabel.taxonepithet IS '
1739
The epithet of the taxon within its parent taxon. This is the lowest-rank portion of this taxonlabel''s full taxonomic name, if it has one.
1740
';
1687 1741

  
1688 1742

  
1689 1743
--
1690 1744
-- Name: COLUMN taxonlabel.rank; Type: COMMENT; Schema: public; Owner: -
1691 1745
--
1692 1746

  
1693
COMMENT ON COLUMN taxonlabel.rank IS 'The taxon''s level in the taxonomic hierarchy, standardized to a closed list. Even if you specify a custom verbatimrank in taxonverbatim, you should also specify a closest-match rank from the taxonrank closed list.';
1747
COMMENT ON COLUMN taxonlabel.rank IS '
1748
The taxon''s level in the taxonomic hierarchy, standardized to a closed list. Even if you specify a custom verbatimrank in taxonverbatim, you should also specify a closest-match rank from the taxonrank closed list.
1749
';
1694 1750

  
1695 1751

  
1696 1752
--
1697 1753
-- Name: COLUMN taxonlabel.taxonomicname; Type: COMMENT; Schema: public; Owner: -
1698 1754
--
1699 1755

  
1700
COMMENT ON COLUMN taxonlabel.taxonomicname IS 'The concatenated taxonomic name which uniquely identifies this taxon, including the family and author of that name. Must be unique within the datasource.
1756
COMMENT ON COLUMN taxonlabel.taxonomicname IS '
1757
The concatenated taxonomic name which uniquely identifies this taxon, including the family and author of that name. Must be unique within the datasource.
1701 1758

  
1702
Equivalent to Darwin Core''s scientificName.';
1759
Equivalent to Darwin Core''s scientificName.
1760
';
1703 1761

  
1704 1762

  
1705 1763
--
......
2027 2085
-- Name: TABLE aggregateoccurrence; Type: COMMENT; Schema: public; Owner: -
2028 2086
--
2029 2087

  
2030
COMMENT ON TABLE aggregateoccurrence IS 'Equivalent to VegBank''s taxonimportance table.';
2088
COMMENT ON TABLE aggregateoccurrence IS '
2089
Equivalent to VegBank''s taxonimportance table.
2090
';
2031 2091

  
2032 2092

  
2033 2093
--
2034 2094
-- Name: COLUMN aggregateoccurrence.linecover_m; Type: COMMENT; Schema: public; Owner: -
2035 2095
--
2036 2096

  
2037
COMMENT ON COLUMN aggregateoccurrence.linecover_m IS 'The distance in m along which this occurrence intercepts a line subplot.';
2097
COMMENT ON COLUMN aggregateoccurrence.linecover_m IS '
2098
The distance in m along which this occurrence intercepts a line subplot.
2099
';
2038 2100

  
2039 2101

  
2040 2102
--
2041 2103
-- Name: COLUMN aggregateoccurrence.occurrencestatus_dwc; Type: COMMENT; Schema: public; Owner: -
2042 2104
--
2043 2105

  
2044
COMMENT ON COLUMN aggregateoccurrence.occurrencestatus_dwc IS 'The extent to which the taxon is present. See <http://code.google.com/p/darwincore/wiki/Occurrence#occurrenceStatus>.';
2106
COMMENT ON COLUMN aggregateoccurrence.occurrencestatus_dwc IS '
2107
The extent to which the taxon is present. See <http://code.google.com/p/darwincore/wiki/Occurrence#occurrenceStatus>.
2108
';
2045 2109

  
2046 2110

  
2047 2111
--
......
2226 2290
-- Name: COLUMN coordinates.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: -
2227 2291
--
2228 2292

  
2229
COMMENT ON COLUMN coordinates.footprintgeometry_dwc IS 'DwC''s footprintWKT field. "A Well-Known Text (WKT) representation of the shape (footprint, geometry) that defines the Location" (http://rs.tdwg.org/dwc/terms/#footprintWKT).';
2293
COMMENT ON COLUMN coordinates.footprintgeometry_dwc IS '
2294
DwC''s footprintWKT field. "A Well-Known Text (WKT) representation of the shape (footprint, geometry) that defines the Location" (http://rs.tdwg.org/dwc/terms/#footprintWKT).
2295
';
2230 2296

  
2231 2297

  
2232 2298
--
2233 2299
-- Name: COLUMN coordinates.coordsaccuracy_m; Type: COMMENT; Schema: public; Owner: -
2234 2300
--
2235 2301

  
2236
COMMENT ON COLUMN coordinates.coordsaccuracy_m IS 'Accuracy of latitude/longitude or footprint geometry, in meters. This should generally be at least 1 m, which is the accuracy of the best GPSes.';
2302
COMMENT ON COLUMN coordinates.coordsaccuracy_m IS '
2303
Accuracy of latitude/longitude or footprint geometry, in meters. This should generally be at least 1 m, which is the accuracy of the best GPSes.
2304
';
2237 2305

  
2238 2306

  
2239 2307
--
......
2250 2318
-- Name: TABLE cultivated_family_locations; Type: COMMENT; Schema: public; Owner: -
2251 2319
--
2252 2320

  
2253
COMMENT ON TABLE cultivated_family_locations IS 'from sftp://nimoy.nceas.ucsb.edu/home/bien/bien2_scripts/geoscrub/cultivated/cult_by_taxon/flag_by_taxa.inc';
2321
COMMENT ON TABLE cultivated_family_locations IS '
2322
from sftp://nimoy.nceas.ucsb.edu/home/bien/bien2_scripts/geoscrub/cultivated/cult_by_taxon/flag_by_taxa.inc
2323
';
2254 2324

  
2255 2325

  
2256 2326
--
......
2321 2391
-- Name: TABLE location; Type: COMMENT; Schema: public; Owner: -
2322 2392
--
2323 2393

  
2324
COMMENT ON TABLE location IS 'Equivalent to VegBank''s plot table.';
2394
COMMENT ON TABLE location IS '
2395
Equivalent to VegBank''s plot table.
2396
';
2325 2397

  
2326 2398

  
2327 2399
--
2328 2400
-- Name: COLUMN location.top_plot; Type: COMMENT; Schema: public; Owner: -
2329 2401
--
2330 2402

  
2331
COMMENT ON COLUMN location.top_plot IS 'autopopulated';
2403
COMMENT ON COLUMN location.top_plot IS '
2404
autopopulated
2405
';
2332 2406

  
2333 2407

  
2334 2408
--
......
2421 2495
-- Name: TABLE locationevent; Type: COMMENT; Schema: public; Owner: -
2422 2496
--
2423 2497

  
2424
COMMENT ON TABLE locationevent IS 'Equivalent to VegBank''s observation table.';
2498
COMMENT ON TABLE locationevent IS '
2499
Equivalent to VegBank''s observation table.
2500
';
2425 2501

  
2426 2502

  
2427 2503
--
......
2461 2537
-- Name: TABLE method; Type: COMMENT; Schema: public; Owner: -
2462 2538
--
2463 2539

  
2464
COMMENT ON TABLE method IS 'A method for sampling and aggregating plants. Replaces VegBank''s stratummethod and stratumtype tables.
2540
COMMENT ON TABLE method IS '
2541
A method for sampling and aggregating plants. Replaces VegBank''s stratummethod and stratumtype tables.
2465 2542

  
2466
Important: *All* length- or area-related measurements throughout VegBIEN must be converted to SI base units, e.g. cm -> m, ha -> m^2.**';
2543
Important: *All* length- or area-related measurements throughout VegBIEN must be converted to SI base units, e.g. cm -> m, ha -> m^2.**
2544
';
2467 2545

  
2468 2546

  
2469 2547
--
2470 2548
-- Name: COLUMN method.source_id; Type: COMMENT; Schema: public; Owner: -
2471 2549
--
2472 2550

  
2473
COMMENT ON COLUMN method.source_id IS 'Use the source table (e.g. source.url) to store a link to the original plain text description.';
2551
COMMENT ON COLUMN method.source_id IS '
2552
Use the source table (e.g. source.url) to store a link to the original plain text description.
2553
';
2474 2554

  
2475 2555

  
2476 2556
--
2477 2557
-- Name: COLUMN method.name; Type: COMMENT; Schema: public; Owner: -
2478 2558
--
2479 2559

  
2480
COMMENT ON COLUMN method.name IS 'A short name for the set of methods used. Although there is no existing standard, many names are widely used, and could be useful for finding plots with similar methodology.';
2560
COMMENT ON COLUMN method.name IS '
2561
A short name for the set of methods used. Although there is no existing standard, many names are widely used, and could be useful for finding plots with similar methodology.
2562
';
2481 2563

  
2482 2564

  
2483 2565
--
2484 2566
-- Name: COLUMN method.description; Type: COMMENT; Schema: public; Owner: -
2485 2567
--
2486 2568

  
2487
COMMENT ON COLUMN method.description IS 'Additional metadata helpful for understanding how the data were collected during the observation event.';
2569
COMMENT ON COLUMN method.description IS '
2570
Additional metadata helpful for understanding how the data were collected during the observation event.
2571
';
2488 2572

  
2489 2573

  
2490 2574
--
2491 2575
-- Name: COLUMN method.diameterheight_m; Type: COMMENT; Schema: public; Owner: -
2492 2576
--
2493 2577

  
2494
COMMENT ON COLUMN method.diameterheight_m IS 'The height in m at which the diameter is measured. e.g. 1.37 m for breast height (DBH).';
2578
COMMENT ON COLUMN method.diameterheight_m IS '
2579
The height in m at which the diameter is measured. e.g. 1.37 m for breast height (DBH).
2580
';
2495 2581

  
2496 2582

  
2497 2583
--
2498 2584
-- Name: COLUMN method.mindiameter_m; Type: COMMENT; Schema: public; Owner: -
2499 2585
--
2500 2586

  
2501
COMMENT ON COLUMN method.mindiameter_m IS 'Lower diameter limit in m for inclusion of a tree.';
2587
COMMENT ON COLUMN method.mindiameter_m IS '
2588
Lower diameter limit in m for inclusion of a tree.
2589
';
2502 2590

  
2503 2591

  
2504 2592
--
2505 2593
-- Name: COLUMN method.maxdiameter_m; Type: COMMENT; Schema: public; Owner: -
2506 2594
--
2507 2595

  
2508
COMMENT ON COLUMN method.maxdiameter_m IS 'Upper diameter limit in m for inclusion of a tree.';
2596
COMMENT ON COLUMN method.maxdiameter_m IS '
2597
Upper diameter limit in m for inclusion of a tree.
2598
';
2509 2599

  
2510 2600

  
2511 2601
--
2512 2602
-- Name: COLUMN method.minheight_m; Type: COMMENT; Schema: public; Owner: -
2513 2603
--
2514 2604

  
2515
COMMENT ON COLUMN method.minheight_m IS 'Lower height limit in m for inclusion of a tree.';
2605
COMMENT ON COLUMN method.minheight_m IS '
2606
Lower height limit in m for inclusion of a tree.
2607
';
2516 2608

  
2517 2609

  
2518 2610
--
2519 2611
-- Name: COLUMN method.maxheight_m; Type: COMMENT; Schema: public; Owner: -
2520 2612
--
2521 2613

  
2522
COMMENT ON COLUMN method.maxheight_m IS 'Upper height limit in m for inclusion of a tree.';
2614
COMMENT ON COLUMN method.maxheight_m IS '
2615
Upper height limit in m for inclusion of a tree.
2616
';
2523 2617

  
2524 2618

  
2525 2619
--
2526 2620
-- Name: COLUMN method.observationtype; Type: COMMENT; Schema: public; Owner: -
2527 2621
--
2528 2622

  
2529
COMMENT ON COLUMN method.observationtype IS 'values: aggregate, individual, both';
2623
COMMENT ON COLUMN method.observationtype IS '
2624
values: aggregate, individual, both
2625
';
2530 2626

  
2531 2627

  
2532 2628
--
2533 2629
-- Name: COLUMN method.observationmeasure; Type: COMMENT; Schema: public; Owner: -
2534 2630
--
2535 2631

  
2536
COMMENT ON COLUMN method.observationmeasure IS 'e.g. count, cover, presence, points-intercepted, distance-intercepted';
2632
COMMENT ON COLUMN method.observationmeasure IS '
2633
e.g. count, cover, presence, points-intercepted, distance-intercepted
2634
';
2537 2635

  
2538 2636

  
2539 2637
--
2540 2638
-- Name: COLUMN method.samplingfactor; Type: COMMENT; Schema: public; Owner: -
2541 2639
--
2542 2640

  
2543
COMMENT ON COLUMN method.samplingfactor IS 'Here, we could explicitly say that we are sampling a particular area by a different size representative sample area. Simply divide the number of plants connected to this record by this value to get the extrapolated (or interpolated) number of plants in the area in question. This explicitly notes a subsample or supersample.';
2641
COMMENT ON COLUMN method.samplingfactor IS '
2642
Here, we could explicitly say that we are sampling a particular area by a different size representative sample area. Simply divide the number of plants connected to this record by this value to get the extrapolated (or interpolated) number of plants in the area in question. This explicitly notes a subsample or supersample.
2643
';
2544 2644

  
2545 2645

  
2546 2646
--
2547 2647
-- Name: COLUMN method.coverbasis; Type: COMMENT; Schema: public; Owner: -
2548 2648
--
2549 2649

  
2550
COMMENT ON COLUMN method.coverbasis IS 'Were cover values for the total taxon list collected from one contiguous area or dispersed subplots?
2650
COMMENT ON COLUMN method.coverbasis IS '
2651
Were cover values for the total taxon list collected from one contiguous area or dispersed subplots?
2551 2652

  
2552 2653
entire: Cover based on observation of an entire plot consisting of a single contiguous area of land. subplot-contiguous: Cover based on observation of a single contiguous area of land of less spatial extent than the entire plot.
2553 2654

  
......
2567 2668
-- Name: COLUMN method.stemsamplemethod; Type: COMMENT; Schema: public; Owner: -
2568 2669
--
2569 2670

  
2570
COMMENT ON COLUMN method.stemsamplemethod IS 'The method used to obtain basal area or tree stem data (e.g., full census, point quarter, random pairs, Bitterlich, other).
2671
COMMENT ON COLUMN method.stemsamplemethod IS '
2672
The method used to obtain basal area or tree stem data (e.g., full census, point quarter, random pairs, Bitterlich, other).
2571 2673

  
2572 2674
e.g.:
2573 2675
Full census
......
2575 2677
Random pairs
2576 2678
Bitterlich
2577 2679
Other
2578
Subsample census';
2680
Subsample census
2681
';
2579 2682

  
2580 2683

  
2581 2684
--
2582 2685
-- Name: COLUMN method.shape; Type: COMMENT; Schema: public; Owner: -
2583 2686
--
2584 2687

  
2585
COMMENT ON COLUMN method.shape IS 'e.g. square, rectangle, circle, line, point, other';
2688
COMMENT ON COLUMN method.shape IS '
2689
e.g. square, rectangle, circle, line, point, other
2690
';
2586 2691

  
2587 2692

  
2588 2693
--
2589 2694
-- Name: COLUMN method.samplearea_m2; Type: COMMENT; Schema: public; Owner: -
2590 2695
--
2591 2696

  
2592
COMMENT ON COLUMN method.samplearea_m2 IS 'The total surface area used for cover estimates and for which a complete species list is provided. If subplots were used, this would be the total area of the subplots without interstitial space.';
2697
COMMENT ON COLUMN method.samplearea_m2 IS '
2698
The total surface area used for cover estimates and for which a complete species list is provided. If subplots were used, this would be the total area of the subplots without interstitial space.
2699
';
2593 2700

  
2594 2701

  
2595 2702
--
2596 2703
-- Name: COLUMN method.subplotspacing_m; Type: COMMENT; Schema: public; Owner: -
2597 2704
--
2598 2705

  
2599
COMMENT ON COLUMN method.subplotspacing_m IS 'Spacing in m between adjacent subplots, lines (line-intercept data), or points (point-intercept data).';
2706
COMMENT ON COLUMN method.subplotspacing_m IS '
2707
Spacing in m between adjacent subplots, lines (line-intercept data), or points (point-intercept data).
2708
';
2600 2709

  
2601 2710

  
2602 2711
--
2603 2712
-- Name: COLUMN method.subplotmethod_id; Type: COMMENT; Schema: public; Owner: -
2604 2713
--
2605 2714

  
2606
COMMENT ON COLUMN method.subplotmethod_id IS 'Method to use for each subplot/line/point, which will specify subplot size, line length, etc.';
2715
COMMENT ON COLUMN method.subplotmethod_id IS '
2716
Method to use for each subplot/line/point, which will specify subplot size, line length, etc.
2717
';
2607 2718

  
2608 2719

  
2609 2720
--
2610 2721
-- Name: COLUMN method.pointsperline; Type: COMMENT; Schema: public; Owner: -
2611 2722
--
2612 2723

  
2613
COMMENT ON COLUMN method.pointsperline IS 'The number of points sampled on each line subplot for point-intercept data.';
2724
COMMENT ON COLUMN method.pointsperline IS '
2725
The number of points sampled on each line subplot for point-intercept data.
2726
';
2614 2727

  
2615 2728

  
2616 2729
--
......
2661 2774
-- Name: TABLE plantobservation; Type: COMMENT; Schema: public; Owner: -
2662 2775
--
2663 2776

  
2664
COMMENT ON TABLE plantobservation IS 'Equivalent to VegBank''s stemcount table.';
2777
COMMENT ON TABLE plantobservation IS '
2778
Equivalent to VegBank''s stemcount table.
2779
';
2665 2780

  
2666 2781

  
2667 2782
--
2668 2783
-- Name: COLUMN plantobservation.authorplantcode; Type: COMMENT; Schema: public; Owner: -
2669 2784
--
2670 2785

  
2671
COMMENT ON COLUMN plantobservation.authorplantcode IS 'The number of the organism within the data collection or event.';
2786
COMMENT ON COLUMN plantobservation.authorplantcode IS '
2787
The number of the organism within the data collection or event.
2788
';
2672 2789

  
2673 2790

  
2674 2791
--
......
2808 2925
-- Name: TABLE specimenreplicate; Type: COMMENT; Schema: public; Owner: -
2809 2926
--
2810 2927

  
2811
COMMENT ON TABLE specimenreplicate IS 'A herbarium''s replicate of a specimen. Contains Darwin Core specimen data.';
2928
COMMENT ON TABLE specimenreplicate IS '
2929
A herbarium''s replicate of a specimen. Contains Darwin Core specimen data.
2930
';
2812 2931

  
2813 2932

  
2814 2933
--
2815 2934
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2816 2935
--
2817 2936

  
2818
COMMENT ON COLUMN specimenreplicate.institution_id IS 'The institution (such as a museum) that the specimenreplicate is from.';
2937
COMMENT ON COLUMN specimenreplicate.institution_id IS '
2938
The institution (such as a museum) that the specimenreplicate is from.
2939
';
2819 2940

  
2820 2941

  
2821 2942
--
2822 2943
-- Name: COLUMN specimenreplicate.collectioncode_dwc; Type: COMMENT; Schema: public; Owner: -
2823 2944
--
2824 2945

  
2825
COMMENT ON COLUMN specimenreplicate.collectioncode_dwc IS 'The code for the collection that the specimenreplicate is from.';
2946
COMMENT ON COLUMN specimenreplicate.collectioncode_dwc IS '
2947
The code for the collection that the specimenreplicate is from.
2948
';
2826 2949

  
2827 2950

  
2828 2951
--
......
2855 2978
-- Name: TABLE stemobservation; Type: COMMENT; Schema: public; Owner: -
2856 2979
--
2857 2980

  
2858
COMMENT ON TABLE stemobservation IS 'Equivalent to VegBank''s stemlocation table.';
2981
COMMENT ON TABLE stemobservation IS '
2982
Equivalent to VegBank''s stemlocation table.
2983
';
2859 2984

  
2860 2985

  
2861 2986
--
2862 2987
-- Name: COLUMN stemobservation.tags; Type: COMMENT; Schema: public; Owner: -
2863 2988
--
2864 2989

  
2865
COMMENT ON COLUMN stemobservation.tags IS 'Stores all tags when multiple tags provided. Older tags go first.';
2990
COMMENT ON COLUMN stemobservation.tags IS '
2991
Stores all tags when multiple tags provided. Older tags go first.
2992
';
2866 2993

  
2867 2994

  
2868 2995
--
......
2894 3021
-- Name: TABLE taxondetermination; Type: COMMENT; Schema: public; Owner: -
2895 3022
--
2896 3023

  
2897
COMMENT ON TABLE taxondetermination IS 'Equivalent to VegBank''s taxoninterpretation table.';
3024
COMMENT ON TABLE taxondetermination IS '
3025
Equivalent to VegBank''s taxoninterpretation table.
3026
';
2898 3027

  
2899 3028

  
2900 3029
--
......
2920 3049
-- Name: TABLE taxonoccurrence; Type: COMMENT; Schema: public; Owner: -
2921 3050
--
2922 3051

  
2923
COMMENT ON TABLE taxonoccurrence IS 'Equivalent to VegBank''s taxonobservation table.';
3052
COMMENT ON TABLE taxonoccurrence IS '
3053
Equivalent to VegBank''s taxonobservation table.
3054
';
2924 3055

  
2925 3056

  
2926 3057
--
2927 3058
-- Name: COLUMN taxonoccurrence.iscultivated; Type: COMMENT; Schema: public; Owner: -
2928 3059
--
2929 3060

  
2930
COMMENT ON COLUMN taxonoccurrence.iscultivated IS 'cultivated or wild';
3061
COMMENT ON COLUMN taxonoccurrence.iscultivated IS '
3062
cultivated or wild
3063
';
2931 3064

  
2932 3065

  
2933 3066
--
2934 3067
-- Name: COLUMN taxonoccurrence.cultivatedbasis; Type: COMMENT; Schema: public; Owner: -
2935 3068
--
2936 3069

  
2937
COMMENT ON COLUMN taxonoccurrence.cultivatedbasis IS 'The reason why a taxonoccurrence was marked as cultivated (or not).';
3070
COMMENT ON COLUMN taxonoccurrence.cultivatedbasis IS '
3071
The reason why a taxonoccurrence was marked as cultivated (or not).
3072
';
2938 3073

  
2939 3074

  
2940 3075
--
2941 3076
-- Name: COLUMN taxonoccurrence.isnative; Type: COMMENT; Schema: public; Owner: -
2942 3077
--
2943 3078

  
2944
COMMENT ON COLUMN taxonoccurrence.isnative IS 'native or exotic';
3079
COMMENT ON COLUMN taxonoccurrence.isnative IS '
3080
native or exotic
3081
';
2945 3082

  
2946 3083

  
2947 3084
--
......
2971 3108
-- Name: TABLE taxonverbatim; Type: COMMENT; Schema: public; Owner: -
2972 3109
--
2973 3110

  
2974
COMMENT ON TABLE taxonverbatim IS 'Component parts of the taxonlabel. Contains the datasource''s original taxonomic name components, as well as any parsed components produced by name resolution.';
3111
COMMENT ON TABLE taxonverbatim IS '
3112
Component parts of the taxonlabel. Contains the datasource''s original taxonomic name components, as well as any parsed components produced by name resolution.
3113
';
2975 3114

  
2976 3115

  
2977 3116
--
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff