[postgis-users] estimated_extent does not work

Michael Fuhr mike at fuhr.org
Sun Sep 17 18:05:41 PDT 2006


On Sun, Sep 17, 2006 at 05:14:39PM -0700, Jose Carlos Martinez wrote:
> I have a problem with the function estimated_extent,
> it only works if the actual user is the owner and has superuser permissions,
> but it does not work if the actual user is other superuser that the
> table owner.
> 
> is it normal? I think any superuser should be able to run this
> function...am I right?
> 
> Thanks,
> 
> test1=# select estimated_extent ('suelos','geom');
> ERROR:  permission denied for relation pg_statistic

What versions of PostgreSQL and PostGIS are you using?  I haven't
been able to reproduce this error with PostgreSQL 8.1.4 and PostGIS
1.1.4CVS.   estimated_extent() should be SECURITY DEFINER; what's
the output of the following queries?

SELECT p.oid::regprocedure, p.prosecdef, u.usename, u.usesuper
FROM pg_proc AS p
LEFT JOIN pg_user AS u ON u.usesysid = p.proowner
WHERE p.proname = 'estimated_extent';

SELECT c.oid::regclass, c.relacl, u.usename, u.usesuper
FROM pg_class AS c
LEFT JOIN pg_user AS u ON u.usesysid = c.relowner
WHERE c.relname = 'pg_statistic';

-- 
Michael Fuhr



More information about the postgis-users mailing list