I'm converting our application from using pg.connect().query
pg.DB().query_formatted(), and ran into an issue involving .dictresult() with a
column of postgis type "geometry".  I see in the logs pygres attempting to
convert to python type, and failing (silently to the application) like this:

2016-07-12 15:46:21.055 
EDT,"telsasoft","ts",16716,"[local]",5785468c.414c,620,"BIND",2016-07-12 
15:35:40 EDT,2/869507,0,ERROR,42601,"syntax error at or near 
""-""",,,,,"invalid type name ""-799870613""","SELECT oid, typname, 
typname::regtype, typtype, typcategory, typdelim, typrelid FROM pg_type WHERE 
oid=$1::regtype",,,""

The error is evidently caused by this:

ts=# SELECT oid, oid::bigint-(2^32), oid::int, typname FROM pg_type WHERE 
typname='geometry' ORDER BY 1 DESC LIMIT 99;
-[ RECORD 1 ]--------
oid      | 3495096683
?column? | -799870613
oid      | -799870613
typname  | geometry

Is there an oid overflowing a 32 bit integer, or a %d rather than %lu ?

Thanks,
Justin
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to