In an answer yesterday I learned that I can use DB Manager via Python to
work with my PostGIS database.

Within the Processing framework, I need to get a reference to a database
based on an input layer. In the past, I could accomplish this by parsing
the layer's URI. However, it appears that DB Manager refers to databases
using the DB's connection name as given in QGIS. How can I refer to my
database from one of its tables that exists as a layer in QGIS?

Here's an example:

Table name: foo
Database name in PostgreSQL: bar
Connection name in QGIS: baz

I need to get "baz" based on a QGIS layer that points to "foo".

Thanks for any help!
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to