Revision 10368
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/runscripts/table.run | ||
---|---|---|
47 | 47 |
is_view="$(test -e "$postprocess_sql" \ |
48 | 48 |
&& grep -F force_update_view "$postprocess_sql" >/dev/null; exit2bool)" |
49 | 49 |
|
50 |
map_table="\"~$table.map\"" # sort after other tables to avoid clutter |
|
51 |
|
|
50 | 52 |
map_table() |
51 | 53 |
# note that collisions may prevent all renames from being made at once. |
52 | 54 |
# if this is the case, run map_table repeatedly until no more renames are made: |
... | ... | |
58 | 60 |
if test "$is_view"; then return 0; fi # do not rename view columns |
59 | 61 |
|
60 | 62 |
table_make map.csv |
61 |
local map_table="\"~$table.map\"" # sort after other tables to avoid clutter |
|
62 | 63 |
psql <<EOF |
63 | 64 |
SELECT util.reset_map_table('$map_table'); |
64 | 65 |
ALTER TABLE $map_table DISABLE TRIGGER map_filter_insert; |
Also available in: Unified diff
bugfix: lib/runscripts/table.run: map_table(): moved $map_table to global var so it can be used by other functions