[postgis-users] QGIS SPIT import to POSTGIS -
rac88 at hawaii.edu
Tue Jul 13 13:36:54 PDT 2010
Thanks for the reply.
All the items you mentioned had been addressed.
On further investigation I found the solution:
QGIS SPIT calls the has_schema_privilege function via the script "select
nspname from pg_namespace where has_schema_privilege(nspname, 'CREATE')".
Note the second term 'CREATE'.
The function has_schema_privilege(schema, privilege) queries whether the
current user have the privilege for schema.
For schemas, the CREATE privilege allows new objects to be created within
QGIS SPIT did not show the additional schemas as the user had been granted
the USAGE privilege only. For the user to create new tables in the schema
the user has to have CREATE privileges or ALL privileges or be the owner of
the schema (which gives the user ALL privileges).
Thanks all for the consideration of my problem.
Luís de Sousa wrote:
> Hi Abe,
> What version of QGis are you using? With 1.4 you need the following
> for a user to add a layer from postgis:
> . The layer correctly identified in the geometry_columns table;
> . A primary key, or otherwise unique integer field, in the layer table;
> . Usage premissions on the schema where the layer is;
> . Select premissions on the layer itself;
> With all this you should be able to load the layer into QGis.
> Good luck,
> On Fri, Jul 9, 2010 at 11:23 PM, rac88 <rac88 at hawaii.edu> wrote:
>> I'm trying to use QGIS SPIT to load multiple shapefiles into PostGIS.
>> for all users but my superuser, I can't see the non-public schemas.
>> It sounds permission based but when I sign in as the user via PGAdmin or
>> psql I can access and view the schemas.
>> The schemas were created within the postgis database so they should have
>> postgis extension - to confirm this I created a new schema from the
>> folder in the postgis database but this was not viewable either.
>> I've included the schemas in the postgres.conf search_path also. And,
>> geometry columns are in the public.geometry_column table.
>> Line 478 of qgsspit.cpp is the only SQL reference to the namespace I can
>> (QString schemaSql = "select nspname from pg_namespace where
>> has_schema_privilege(nspname, 'CREATE')";) and this works from both
>> and psql. I also copied the function to the specific database and schema
>> determine if it was simply not finding the function but this didn't work
>> Yes I can revert back to shp2pgsql but I like the multiple files option
>> SPIT - otherwise, can someone assist with some vb script or batch file to
>> run shp2pgsql on files within a folder.
>> Am I missing something else in the POSTGIS environment that may be
>> restricting this user's ability?
>> View this message in context:
>> Sent from the PostGIS - User mailing list archive at Nabble.com.
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
> postgis-users mailing list
> postgis-users at postgis.refractions.net
View this message in context: http://old.nabble.com/QGIS-SPIT-import-to-POSTGIS---tp29122870p29155403.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
More information about the postgis-users