Is your user account the owner of geometry_columns? (often this is postgres) If not, then use the commands to allow permissions:<div><br></div><div>GRANT ALL ON TABLE geometry_columns TO someuser;</div><div><br></div><div>

-- And while you are at it:</div><div><div>GRANT ALL ON TABLE spatial_ref_sys TO someuser;</div></div><div><br></div><div>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.</div>

<div><br></div><div>-Mike<br><br><div class="gmail_quote">On 28 July 2010 00:56, <a href="mailto:kreshna_iceheart@yahoo.com" target="_blank">kreshna_iceheart@yahoo.com</a> <span dir="ltr"><<a href="mailto:kreshna_iceheart@yahoo.com" target="_blank">kreshna_iceheart@yahoo.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>



<br>
The postgreSQL user acccount I use with psql is the owner of the target database. However, it is not superuser.<br>
<br>
When I run psql to execute the script, I got the following error:<br>
ERROR:  permission denied for relation geometry_columns<br>
<br>
I eventually decided to give superuser permission to the user account. After I gave superuser permission, the script ran without problem.<br>
<br>
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 permission?<br>



<br>
Thanks,<br>
-Kresh<br>
<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>