[postgis-devel] [PostGIS] #1588: [raster] regression failure due to underquoting

PostGIS trac at osgeo.org
Mon Feb 20 04:52:35 PST 2012


#1588: [raster] regression failure due to underquoting
--------------------+-------------------------------------------------------
 Reporter:  gdt     |       Owner:  pracine      
     Type:  defect  |      Status:  new          
 Priority:  medium  |   Milestone:  PostGIS 2.0.0
Component:  raster  |     Version:  trunk        
 Keywords:          |  
--------------------+-------------------------------------------------------
 In r9235 (and I believe due to a change within the last week), make
 check fails in raster with

 {{{
 Creating spatial db postgis_reg
 createlang: language "plpgsql" is already installed in database
 "postgis_reg"
 Adding raster support

  Something went wrong during db initialization (raster comments).
  For details, check /tmp/pgis_reg_7747/regress_log
 }}}
 which contains
 {{{
 psql:/home/gdt/SOFTWARE/POSTGIS/postgis/regress/00-regress-
 install/share/contrib/postgis/raster_comments.sql:322: ERROR:  syntax
 error at or near "BOTH"
 LINE 1: ...egprocedure ) IS 'args: rast1, rast2, returnband='BOTH', oth...
                                                              ^
 }}}

 This is due, I think, to the following in raster/rt_pg/rtpostgis.sql.in:
 {{{
 CREATE OR REPLACE FUNCTION st_intersection(
         rast1 raster,
         rast2 raster,
         returnband text DEFAULT 'BOTH',
         otheruserfunc regprocedure DEFAULT NULL
 )
         RETURNS raster AS
         $$ SELECT st_intersection($1, 1, $2, 1, $3, $4) $$
         LANGUAGE 'sql' STABLE;
 }}}

 The problem seems to be that the single quotes around BOTH are not
 themselves quoted when used inside a dcoumentation string.

 I observed the problem with
 {{{
   PostGIS is now configured for i386-unknown-netbsdelf5.1.

  -------------- Compiler Info -------------
   C compiler:           gcc -g -O2
   C++ compiler:         g++ -g -O2

  -------------- Dependencies --------------
   GEOS config:          /usr/pkg/bin/geos-config
   GEOS version:         3.3.2
   GDAL config:          /usr/pkg/bin/gdal-config
   GDAL version:         1.8.1
   PostgreSQL config:    /usr/pkg/bin/pg_config
   PostgreSQL version:   PostgreSQL 9.1.2
   PROJ4 version:        47
   Libxml2 config:       /usr/pkg/bin/xml2-config
   Libxml2 version:      2.7.8
   JSON-C support:       no
   PostGIS debug level:  0
   Perl:                 /usr/pkg/bin/perl
 }}}
 but strk reports seeing it as well, so it's not a NetBSD-specific
 issue.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1588>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list