[postgis-tickets] r14317 - closes #3347 force order of staged insert columns to be in table column order
Regina Obe
lr at pcorp.us
Sat Oct 24 15:13:43 PDT 2015
Author: robe
Date: 2015-10-24 15:13:42 -0700 (Sat, 24 Oct 2015)
New Revision: 14317
Modified:
branches/2.1/extras/tiger_geocoder/tiger_2011/tiger_loader_2013.sql
Log:
closes #3347 force order of staged insert columns to be in table column order
Modified: branches/2.1/extras/tiger_geocoder/tiger_2011/tiger_loader_2013.sql
===================================================================
--- branches/2.1/extras/tiger_geocoder/tiger_2011/tiger_loader_2013.sql 2015-10-24 22:11:40 UTC (rev 14316)
+++ branches/2.1/extras/tiger_geocoder/tiger_2011/tiger_loader_2013.sql 2015-10-24 22:13:42 UTC (rev 14317)
@@ -373,12 +373,14 @@
FROM information_schema.columns
WHERE table_name = param_target_table
AND table_schema = var_data_schema
- AND column_name <> ALL(param_columns_exclude) ), ',') || ') SELECT '
+ AND column_name <> ALL(param_columns_exclude)
+ ORDER BY ordinal_position ), ',') || ') SELECT '
|| array_to_string(ARRAY(SELECT quote_ident(column_name::text)
FROM information_schema.columns
WHERE table_name = param_staging_table
AND table_schema = var_staging_schema
- AND column_name <> ALL( param_columns_exclude) ), ',') ||' FROM '
+ AND column_name <> ALL( param_columns_exclude)
+ ORDER BY ordinal_position ), ',') ||' FROM '
|| var_staging_schema || '.' || param_staging_table || ';';
RAISE NOTICE '%', var_sql;
EXECUTE (var_sql);
More information about the postgis-tickets
mailing list