[postgis-users] Problem with probe_geometry_columns()

Ben Madin lists at remoteinformation.com.au
Tue May 18 20:31:38 PDT 2010


Fred,

On 18/05/2010, at 22:38 , Fred Lehodey wrote:

> I have no success trying the function probe_geometry_columns() with Postgis 1.5.0 
> 
> 1) Not sure but comparing the SQL with Postgis 1.3.3:
> the clause  (in the INSERT step and not the count of probed)
> "sridcheck.consrc LIKE '(srid('||a.attname||') = %)'   in postgis 1.3.3
> is now:
> "sridcheck.consrc LIKE '(st_srid('||a.attname||') = %)'  in postgis 1.5.0
> This looks like a tipo error. (this is not the function here but the constraint text in pg_constraint) 

I think the st_ prefix is now required, 

> 2) I have a second problem with pg_constraint table and the "consrc" field.
> Most of time I have something like :
> "(public.srid(the_geom) = 27492)"  
> and not (as expected by the function probe_geometry_columns()) :
> "(srid(the_geom) = 27492)"

This was previously an issue if you installed postgis into other than the public schema. The public schema reference was in a few locations, so you need to search it out in the function defs and remove it and recreate the function if you don't want to upgrade.

I have upgraded a number of databases to 1.5 from 1.4 and it seems to have fixed it... but I have also mucked it by not changing the search_path prior to running the upgrade, leaving me with multiple postgis function definitions! 

cheers

Ben




More information about the postgis-users mailing list