]> granicus.if.org Git - postgis/commitdiff
Fix pgsql2shp for big-endian systems (#1900)
authorSandro Santilli <strk@keybit.net>
Wed, 4 Jul 2012 13:12:58 +0000 (13:12 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 4 Jul 2012 13:12:58 +0000 (13:12 +0000)
Submitted By: Ryan Oliver <ryan.oliver@dse.vic.gov.au>

git-svn-id: http://svn.osgeo.org/postgis/trunk@10034 b70326c6-7e19-0410-871a-916f4a2858ee

loader/pgsql2shp-core.c

index 2a903f0044d0cd4f4ce0fc9483c41dc31c6602e2..382c759d350917cf0bfcfd221f1369665ee62feb 100644 (file)
@@ -1928,11 +1928,11 @@ ShpDumperOpenTable(SHPDUMPERSTATE *state)
                {
                        if (state->pgis_major_version > 0)
                        {
-                               sprintf(buf, "ST_asEWKB(ST_SetSRID(\"%s\"::geometry, 0), 'XDR')", state->geo_col_name);
+                               sprintf(buf, "ST_asEWKB(ST_SetSRID(\"%s\"::geometry, 0), 'XDR') AS _geoX", state->geo_col_name);
                        }
                        else
                        {
-                               sprintf(buf, "asbinary(\"%s\"::geometry, 'XDR')",
+                               sprintf(buf, "asbinary(\"%s\"::geometry, 'XDR') AS _geoX",
                                        state->geo_col_name);
                        }
                }