[postgis-users] Re: estimated_extent does not work

Jose Carlos Martinez jomarlla at cgf.upv.es
Mon Sep 18 16:11:54 PDT 2006


Hi Michael,

The versions of the PostGIS and PostgreSQL are:

 POSTGIS="1.1.3" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
USE_STATS

 PostgreSQL 8.1.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.0
(SUSE Linux)

and the output of your queries:
-- The tables owner is jomarlla, but I have used the superuser 'postgres'.
Upps, I think the problem is the user jomarlla (It is the one who
executed the lwpostgis.sql file), has not superuser permission right now,
I am sorry, it works good...

Thanks a lot,

Jose carlos

test1=# SELECT p.oid::regprocedure, p.prosecdef, u.usename, u.usesuper
test1-# FROM pg_proc AS p
test1-# LEFT JOIN pg_user AS u ON u.usesysid = p.proowner
test1-# WHERE p.proname = 'estimated_extent';
               oid                | prosecdef | usename  | usesuper
----------------------------------+-----------+----------+----------
 estimated_extent(text,text)      | t         | jomarlla | f
 estimated_extent(text,text,text) | t         | jomarlla | f
(2 rows)


test1=# SELECT c.oid::regclass, c.relacl, u.usename, u.usesuper
test1-# FROM pg_class AS c
test1-# LEFT JOIN pg_user AS u ON u.usesysid = c.relowner
test1-# WHERE c.relname = 'pg_statistic';
     oid      |           relacl            | usename  | usesuper
--------------+-----------------------------+----------+----------
 pg_statistic | {postgres=arwdRxt/postgres} | postgres | t


test1=# select estimated_extent('suelos','geom');
ERROR:  permission denied for relation pg_statistic
CONTEXT:  SQL statement "SELECT s.stanumbers1[5:8] FROM pg_statistic s,
pg_class c, pg_attribute a, pg_namespace n WHERE c.relname = 'suelos'
AND a.attrelid = c.oid AND a.attname = 'geom' AND n.nspname =
current_schema() AND c.relnamespace = n.oid AND s.starelid=c.oid AND
s.staattnum = a.attnum AND staattnum = attnum"








More information about the postgis-users mailing list