[postgis-users] How to import SHP without superuser permission?
mwtoews at gmail.com
Wed Jul 28 07:07:38 PDT 2010
Is your user account the owner of geometry_columns? (often this is postgres)
If not, then use the commands to allow permissions:
GRANT ALL ON TABLE geometry_columns TO someuser;
-- And while you are at it:
GRANT ALL ON TABLE spatial_ref_sys TO someuser;
If you have multiple users, you might want to consider using roles that are
inherited by other users. This way you only need to enable the role
permissions to the tables once, then each user can inherit that role.
On 28 July 2010 00:56, kreshna_iceheart at yahoo.com <
kreshna_iceheart at yahoo.com> wrote:
> I tried to import SHP files into postGIS. As usual, I use shp2pgsql to
> create the SQL script, and then I use psql to execute the script.
> The postgreSQL user acccount I use with psql is the owner of the target
> database. However, it is not superuser.
> When I run psql to execute the script, I got the following error:
> ERROR: permission denied for relation geometry_columns
> I eventually decided to give superuser permission to the user account.
> After I gave superuser permission, the script ran without problem.
> Question: why did I got permission denied error? The user account is
> already the owner of the target database; why can't it import the data. Is
> there a way to import SHP files into postGIS database without superuser
> postgis-users mailing list
> postgis-users at postgis.refractions.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users