Closed (fixed)
Project:
Sync PostGIS
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Apr 2012 at 13:20 UTC
Updated:
19 Jun 2012 at 20:41 UTC
Jump to comment: Most recent file
I installed the module and activated it. The module created database tables "entity" and "entity_geom".
I triggered sync and cron and database table "entity" has beeen populated, but "entity_geom" did not.
No error were thrown by module (except cron timeout, i had to run cron multiple times but i have over 2000 nodes with Geofield)
I have a Postgres 9.1.3 with PostGIS 2.0.0 installed (AFAIK basic insert functions should be same as PostGIS v 1.5.3)
Is there any way to enable debugging or some documentation?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Schermata 04-2456030 alle 15.29.58.png | 42.51 KB | FeBus982 |
Comments
Comment #1
FeBus982 commentedI got this error in log entries. maybe function should be ST_GeomFromText() ?
PDOException: SQLSTATE[42883]: Undefined function: 7 ERROR: function geomfromtext(unknown, integer) does not exist LINE 1: UPDATE entity_geom SET geom = GeomFromText('POINT (13.9719 4... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.: UPDATE {entity_geom} SET geom = GeomFromText('POINT (13.9719 40.9872)', 4326) WHERE id = :id; Array ( [:id] => 3804 ) in sync_postgis_insert() (line 544 of /var/www/vhosts/skytest.it/meteomed/sites/all/modules/sync_postgis/sync_postgis.module).I attached a screenshot of function being present inside database. Functions and tables are both inside "public" schema.
Comment #2
FeBus982 commentedSubstituting "GeomFromText" with "ST_GeomFromText" on lines 544 and 588 in file sync_postgis.module solves this bug. :)
Comment #3
phayes commentedYup, should definitely be using ST_ commands wherever possible
Comment #4
tnightingale commentedI'm not particularly familiar with the PostGIS releases but it seems that non-prefixed function names have been deprecated for a while now and removed entirely in the 2.x branch.
A temporarily solution for those using PostGIS 2.x is to run the bundled
legacy.sqlscript on your database which will add support for non-prefixed function calls. This can easily be uninstalled with the matchinguninstall_legacy.sqlscript.I believe that newer versions of the 1.x branch support (and recommend) usage of the prefixed function calls. I will verify this and commit a proper fix along with notes on which minimum version of PostGIS we support.
If anyone (phayes?) has more knowledge on changes between PostGIS versions it would be great if you could fill us in and save me some digging. :-)
Comment #5
tnightingale commentedAdded prefixes as they appear to work on PostGIS ~ >1.3.3, see 7.x-1.x.
Documentation needed: #1618094: Determine PostGIS/Postgres minimum requirements