Project

General

Profile

« Previous | Next » 

Revision 8125

Added inputs/FIA/REF_RESEARCH_STATION/postprocess.sql

View differences:

inputs/FIA/REF_RESEARCH_STATION/postprocess.sql
1
-- contains the research station *and state name* for each state
2

  
3
SELECT functions.to_global_col_names(:table_str);
4

  
5
SELECT functions.rename_if_exists($$ALTER TABLE "REF_RESEARCH_STATION" RENAME "REF_RESEARCH_STATION.STATECD" TO ".STATECD"$$);
6

  
7
SELECT functions.set_col_types(:table_str, ARRAY[
8
  ('.STATECD' , 'integer')
9
]::functions.col_cast[]);
10

  
11
SELECT functions.create_if_not_exists($$ALTER TABLE "REF_RESEARCH_STATION" ADD CONSTRAINT "REF_RESEARCH_STATION.unique" UNIQUE (".STATECD")$$);

Also available in: Unified diff