]> granicus.if.org Git - postgis/commitdiff
Escape fields named xmin (xmax was already escaped). See issue #504.
authorSandro Santilli <strk@keybit.net>
Sun, 18 Apr 2010 12:13:36 +0000 (12:13 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 18 Apr 2010 12:13:36 +0000 (12:13 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5566 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-core.c

index 85d8113e53dbd6c039ccf280162966728c075874..4624a9a336eeff20d6209a6986ba4d5f8a8dab75 100644 (file)
@@ -1188,8 +1188,11 @@ ShpLoaderOpenShape(SHPLOADERSTATE *state)
                 */
                if (name[0] == '_' ||
                        ! strcmp(name, "gid") || ! strcmp(name, "tableoid") ||
-                       ! strcmp(name, "cmax") || ! strcmp(name, "xmax") ||
-                       ! strcmp(name, "cmin") || ! strcmp(name, "primary") ||
+                       ! strcmp(name, "cmin") ||
+                       ! strcmp(name, "cmax") ||
+                       ! strcmp(name, "xmin") || 
+                       ! strcmp(name, "xmax") ||
+                       ! strcmp(name, "primary") ||
                        ! strcmp(name, "oid") || ! strcmp(name, "ctid"))
                {
                        strncpy(name2 + 2, name, MAXFIELDNAMELEN - 2);