[postgis-users] Permission denied for relation geometry_columns
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Feb 8 08:04:01 PST 2006
Hi Rolf,
The user executing SELECT AddGeometryColumn(...) must be able to update
the public.geometry_columns table. So you need to change the grants on
this table to include all that you want to be able to execute this command.
-Steve
Rolf de By wrote:
> Perhaps a kind soul is willing to help out, on a problem where I seem to
> be overlooking the obvious . . .
>
> I run a PostgreSQL8.1+PostGIS1.0 installation in a course on spatial
> databases. My users, students, have their own accounts and schemas.
> There is also a public schema that has USAGE grant for PUBLIC. Students
> are supposed to create feature tables in their personal schema, and want
> to register the geometry columns in public.geometry_columns. They do so by:
>
> SELECT AddGeometryColumn('m6h','tempy','geom',4267,'POLYGON',2);
>
> where m6h is both account name and schema name.
>
> The error resulting is:
>
> Error: org.postgresql.util.PSQLException: ERROR: permission denied for
> relation geometry_columns, SQL State: 42501, Error Code: 0
>
> The standard answer to this type of problem is that the user does not
> have sufficient privileges to insert into the geometry_columns table, or
> so I understand. However, if the same user tries the following:
>
> insert into public.geometry_columns
> values('','m6h','tempy','geom',2,4267,'POLYGON');
>
> that will just succeed. Actually the user has been granted SELECT,
> INSERT privileges on that table. Can it be that other privileges are in
> the way?
>
> I am stymied,
>
> Rolf
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list