From: Paul Ramsey Date: Tue, 29 Sep 2015 12:54:22 +0000 (+0000) Subject: #2473, only create spatial index if there's a shape file X-Git-Tag: 2.2.0~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17b48d5484398920c639d06fa8c702f125442d2f;p=postgis #2473, only create spatial index if there's a shape file git-svn-id: http://svn.osgeo.org/postgis/trunk@14132 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/shp2pgsql-core.c b/loader/shp2pgsql-core.c index 460baffb7..43a1af9da 100644 --- a/loader/shp2pgsql-core.c +++ b/loader/shp2pgsql-core.c @@ -1819,7 +1819,7 @@ ShpLoaderGetSQLFooter(SHPLOADERSTATE *state, char **strfooter) stringbuffer_clear(sb); /* Create gist index if specified and not in "prepare" mode */ - if (state->config->createindex) + if (state->config->readshape && state->config->createindex) { stringbuffer_aprintf(sb, "CREATE INDEX ON "); /* Schema is optional, include if present. */