Revision 8128
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/FIA/TREE/postprocess.sql | ||
---|---|---|
20 | 20 |
, ('.SPCD' , 'integer') |
21 | 21 |
]::functions.col_cast[]); |
22 | 22 |
|
23 |
-- ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "CONDID", "SUBP", "TREE", "STATUSCD") is not unique
|
|
24 |
SELECT functions.create_if_not_exists($$ALTER TABLE "TREE" ADD CONSTRAINT "TREE.unique" UNIQUE ("TREE.CN")$$);
|
|
25 |
SELECT functions.cluster_once(:table_str, '"TREE.unique"');
|
|
23 |
-- ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "CONDID", "SUBP", "TREE", "STATUSCD") is not ID
|
|
24 |
SELECT functions.create_if_not_exists($$ALTER TABLE "TREE" ADD CONSTRAINT "TREE.ID" UNIQUE ("TREE.CN")$$);
|
|
25 |
SELECT functions.cluster_once(:table_str, '"TREE.ID"');
|
|
26 | 26 |
|
27 | 27 |
SELECT functions.create_if_not_exists($$CREATE INDEX "TREE.parent" ON "TREE" (".STATECD", ".UNITCD", ".COUNTYCD", ".PLOT", ".INVYR", ".CONDID", ".SUBP")$$); |
Also available in: Unified diff
inputs/FIA/TREE/postprocess.sql: TREE.unique index: Renamed to TREE.ID because this is on an autogenerated pkey rather than on domain values (for which a set of unique columns has not yet been found and may not exist)