Revision 8098
Added by Aaron Marcuse-Kubitza almost 12 years ago
postprocess.sql | ||
---|---|---|
1 | 1 |
SELECT functions.to_global_col_names(:table_str); |
2 | 2 |
|
3 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.STATECD" TO ".STATECD" $$); |
|
4 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.UNITCD" TO ".UNITCD" $$); |
|
5 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.COUNTYCD" TO ".COUNTYCD"$$); |
|
6 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.PLOT" TO ".PLOT" $$); |
|
7 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.INVYR" TO ".INVYR" $$); |
|
8 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.CONDID" TO ".CONDID" $$); |
|
9 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.SUBP" TO ".SUBP" $$); |
|
10 |
SELECT functions.rename_if_exists($$ALTER TABLE "TREE" RENAME "TREE.SPCD" TO ".SPCD" $$); |
|
11 |
|
|
3 | 12 |
-- ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "CONDID", "SUBP", "TREE", "STATUSCD") is not unique |
4 | 13 |
SELECT functions.create_if_not_exists($$ALTER TABLE "TREE" ADD CONSTRAINT "TREE.unique" UNIQUE ("TREE.CN")$$); |
Also available in: Unified diff
inputs/FIA/*/postprocess.sql: Removed table prefix from globally-unique columns that should be joined on