[postgis-commits] svn - r3623 - trunk/loader
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Mon Feb 2 23:20:16 PST 2009
Author: pramsey
Date: 2009-02-02 23:20:16 -0800 (Mon, 02 Feb 2009)
New Revision: 3623
Modified:
trunk/loader/shp2pgsql-core.c
trunk/loader/shp2pgsql.c
Log:
Use "extended string" format for escaping \ and ' in insert statements.
Modified: trunk/loader/shp2pgsql-core.c
===================================================================
--- trunk/loader/shp2pgsql-core.c 2009-02-03 04:36:09 UTC (rev 3622)
+++ trunk/loader/shp2pgsql-core.c 2009-02-03 07:20:16 UTC (rev 3623)
@@ -407,7 +407,7 @@
else
{
escval = protect_quotes_string(val);
- stringbuffer_aprintf(sb_row, "'%s'", escval);
+ stringbuffer_aprintf(sb_row, "E'%s'", escval);
//printf(",");
}
if ( val != escval ) free(escval);
Modified: trunk/loader/shp2pgsql.c
===================================================================
--- trunk/loader/shp2pgsql.c 2009-02-03 04:36:09 UTC (rev 3622)
+++ trunk/loader/shp2pgsql.c 2009-02-03 07:20:16 UTC (rev 3623)
@@ -359,7 +359,7 @@
//printf("\t");
} else {
escval = protect_quotes_string(val);
- printf("'%s'", escval);
+ printf("E'%s'", escval);
//printf(",");
}
if ( val != escval ) free(escval);
More information about the postgis-commits
mailing list