[postgis-users] Corrupt connection string

Vinko Vrsalovic vinko at cprsig.cl
Fri Dec 6 06:41:45 PST 2002


Hello,

A weird thing has been happening lately. Let me show you.

This code:

$qry2 = "the_geom from ( select c.the_geom, c.oid, d.pie_id as PIEID from";
$qry2.= "centroide_comunas c, data_temp ";
$qry2.= "d where d.cod_ine like '".$r."%' and sid = '".session_id()."' ";
$qry2.= "and d.pie_id > -1 ";
$qry2.= "and c.cod_ine = d.cod_ine) as expqry2";

$this->agregaLayer(MS_LAYER_POINT,$qry2);  //This is just a wrapper to
					   //ms_NewLayerObj and a few defaults.
					   //And it works with POSTGIS
					   //layers too.

$this->lastlayer->set("classitem",'PIEID'); //This is equivalent to
					    //$lyr->set()

$this->lastlayer->set("connection",STR_CON);
$this->lastlayer->set("connectiontype",MS_POSTGIS);
$this->lastlayer->set("name","Clasificación_Pun");
$this->lastlayer->set("template","VOID");

Generates the following error. Something made PostgreSQL crash, and
looking at the actual statement, I see it's corrupted.

In line 5 " like '04-0x1... " instead of " like '04%' ".
and in line 8, it says 'centroide_comunas·' instead of
'centroide_comunas'.                     ^

PHP Warning:  MapServer Error in msPOSTGISLayerWhichShapes():
Error executing POSTGIS  SQL   statement (in FETCH ALL): DECLARE
ycursor BINARY CURSOR FOR SELECT PIEID::text,asbinary(force_collection(force_2d
(the_geom)),'NDR'),OID::text from (select c.the_geom, c.oid, d.pie_id as PIEID 
from centroide_comunas c, data_temp d where d.cod_ine like '04-0x1.f5d20bfff84
84p+0nd sid = '4bffd92c9229d024a867a7eed90d96c6' and d.pie_id > -1 and 
c.cod_ine = d.cod_ine) as expqry2 WHERE the_geom && setSRID('BOX3D(150997 
6427850,510887 6787052)'::BOX3D, find_srid('','centroide_comunas·','the_geom') )
in /var/www/html/map.php on line 283
PHP Fatal error:  Call to a member function on a non-object in
/var/www/html/map.php on line 284
NOTICE:  Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.

What can cause this behaviour? What other info is needed?


Thanks,
-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the postgis-users mailing list