On Fri, Sep 28, 2012 at 10:46:45PM +0200, Giuseppe Sucameli wrote:

> depends if the schema was passed when creating the
> uri string used to load the layer:
> 
> QgsDataSourceURI( vl.source() ).schema()
> 
> where vl is the vector layer.
> 
> If the passed schema was empty you will get an empty string.

Uhm. So if you're using the "default schema" you won't know in
this way, right ? Well, I'll need to connect to the database
anyway so might as well query current_schema() if that's the
case. 

What's the recommended way to perform the connection ?
Anything reusable in qgis itself ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to