]> granicus.if.org Git - postgis/commitdiff
Change to SPI_execute so we can run SRS query in 'read_only' mode and avoid transacti...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 10 Jan 2018 14:01:25 +0000 (14:01 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 10 Jan 2018 14:01:25 +0000 (14:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16248 b70326c6-7e19-0410-871a-916f4a2858ee

libpgcommon/lwgeom_transform.c

index 8d9768eaa2cc64d009ad0249e1826469e206b02f..72fc2e450cc239643e2e5bcf15c8c24d61ab6f9c 100644 (file)
@@ -338,7 +338,7 @@ char* GetProj4StringSPI(int srid)
 
        /* Execute the lookup query */
        snprintf(proj4_spi_buffer, 255, "SELECT proj4text FROM spatial_ref_sys WHERE srid = %d LIMIT 1", srid);
-       spi_result = SPI_exec(proj4_spi_buffer, 1);
+       spi_result = SPI_execute(proj4_spi_buffer, true, 1);
 
        /* Read back the PROJ4 text */
        if (spi_result == SPI_OK_SELECT && SPI_processed > 0)