Changes between Initial Version and Version 1 of Ticket #4530, comment 3
- Timestamp:
- 10/13/19 02:14:17 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4530, comment 3
initial v1 1 I think it's a legit failure. The code at hand is raster/rt_pg/rtpostgis.sql.inaround line 7490.2 Function _add_raster_constraint_extent(rastschema name, rasttable name, rastcolumn name).1 I think it's a legit failure. The code at hand is {{{ raster/rt_pg/rtpostgis.sql.in }}} around line 7490. 2 Function {{{ _add_raster_constraint_extent(rastschema name, rasttable name, rastcolumn name) }}}. 3 3 The offending "null argument to EXECUTE" comes from here: 4 4 5 {{{ 5 6 sql := 'SELECT @extschema@.st_ashexewkb( @extschema@.st_setsrid( @extschema@.st_extent( @extschema@.st_envelope(' 6 7 || quote_ident($3) … … 8 9 || fqtn; 9 10 EXECUTE sql INTO attr; 10 11 }}} 11 12 12 13 I bet {{{ srid }}} is the null value, propagating to the whole {{{ sql }}}. Here's how it is fetched: 13 14 15 {{{ 14 16 sql := 'SELECT @extschema@.ST_SRID(' 15 17 || quote_ident($3) … … 20 22 || ' IS NOT NULL LIMIT 1;'; 21 23 EXECUTE sql INTO srid; 22 24 }}} 23 25 24 26 Now.. what if the raster table is empty ? I guess SRID remains NULL, making a NULL sql and getting to the error. I'd rather fix than comment out.