Revision 11749
Added by Aaron Marcuse-Kubitza about 11 years ago
postprocess.sql | ||
---|---|---|
1 | 1 |
SELECT util.search_path_append('util'); |
2 | 2 |
|
3 |
SELECT create_if_not_exists($$ALTER TABLE $$||:table_str||$$ ADD PRIMARY KEY ("PLOT_ID")$$); -- runtime: ~0 ("78.941 ms") @starscream
|
|
3 |
SELECT create_if_not_exists($$ALTER TABLE $$||:table_str||$$ ADD PRIMARY KEY ("locationID")$$); -- runtime: ~0 ("78.941 ms") @starscream
|
|
4 | 4 |
|
5 | 5 |
|
6 | 6 |
-- map_*() derived cols |
... | ... | |
27 | 27 |
LANGUAGE sql IMMUTABLE |
28 | 28 |
COST 100; |
29 | 29 |
|
30 |
SELECT mk_derived_col((:table_str, 'accessRights'), $$map_access_rights("confidentialityStatus")$$); -- runtime: 0.5 s ("292.078 ms") @starscream
|
|
30 |
SELECT mk_derived_col((:table_str, 'accessRights'), $$map_access_rights("accessRights_verbatim")$$); -- runtime: 0.5 s ("292.078 ms") @starscream
|
|
31 | 31 |
|
32 | 32 |
CREATE OR REPLACE FUNCTION map_fuzzing(value integer) |
33 | 33 |
RETURNS double precision AS |
... | ... | |
50 | 50 |
LANGUAGE sql IMMUTABLE |
51 | 51 |
COST 100; |
52 | 52 |
|
53 |
SELECT mk_derived_col((:table_str, 'coordinateUncertaintyInMeters__from_fuzzing'), $$map_fuzzing("confidentialityStatus")$$); -- runtime: 0.2 s ("199.359 ms") @starscream
|
|
53 |
SELECT mk_derived_col((:table_str, 'coordinateUncertaintyInMeters__from_fuzzing'), $$map_fuzzing("accessRights_verbatim")$$); -- runtime: 0.2 s ("199.359 ms") @starscream
|
|
54 | 54 |
|
55 | 55 |
|
56 | 56 |
SELECT mk_derived_col((:table_str, 'coordinateUncertaintyInMeters'), |
57 |
$$GREATEST("coordinateUncertaintyInMeters__from_fuzzing", "locationAccuracy")$$)
|
|
57 |
$$GREATEST("coordinateUncertaintyInMeters__from_fuzzing", "coordinateUncertaintyInMeters__from_coords")$$)
|
|
58 | 58 |
; -- runtime: 0.2 s ("172.425 ms") @starscream |
Also available in: Unified diff
inputs/CVS/: switched to new-style import, using the steps at http://wiki.vegpath.org/Adding_new-style_import_to_a_datasource