[Qgis-developer] QGIS Web Client: WSGI search capabilities using multiple databases

Tony Pham tony_n_pham at yahoo.com
Thu Nov 26 03:58:07 PST 2015


Thanks, Bernard and Andreas.

Yes, I did exactly as your kind recommendations shortly after sending out my initial email inquiry and realized such workaround would work equally as well. 

In essence, I created a new PostgreSQL database called "search_wsgi", extended the DB for PostGIS and DBLink, and then created new "search" tables in this new DB based on other PostGIS databases and simply established a DB_CONN_STRING "connection" to the new "search_wsgi" database. Once I "reloaded" or "restarted" the Apache server, I am now able to search for geometries on my Qgis web client based on the various search tables I generated in the "search_wsgi" DB. 

Note, I have always used DBLink and never FDW so I will have to try FDW's in the future when requiring data outside my connected PostgreSQL DB. 

Cheers,
-Tony


Sent from my iPhone

> On Nov 26, 2015, at 4:58 AM, Andreas Neumann <a.neumann at carto.net> wrote:
> 
> Or use foreign data wrappers (fdw) - which is I believe - the more modern version of dblink.
> 
> You can register a table from another database and it will act as it would be local.
> 
> Andreas
> 
>> On 26.11.2015 09:21, Bernhard Ströbl wrote:
>> Hi,
>> 
>> workaround: use dblink to mirror the relations from the other dbs into the "main" db
>> 
>> Bernhard
>> 
>>> Am 25.11.2015 um 22:03 schrieb Tony Pham:
>>> Hi all,
>>> 
>>> For the WSGI Search capabilities on QGIS Web Client, is it possible to
>>> establish search capabilities using multiple databases (i.e., tables
>>> within multiple databases)?
>>> 
>>> I have QGIS projects which utilize different PostGIS databases and would
>>> like to be able to list all the various databases in my qwc_connect.py
>>> Python file but realize that the DB_CONN_STRING only allows for the
>>> connection to a single database.
>>> 
>>> Has anyone employed or developed a workaround for this?
>>> 
>>> Regards,
>>> -Tony
>>> 
>>> 
>>> __________ Information from ESET Mail Security, version of virus
>>> signature database 12624 (20151125) __________
>>> 
>>> The message was checked by ESET Mail Security.
>>> http://www.eset.com
>>> 
>>> 
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
>> 
>> 
>> __________ Information from ESET Mail Security, version of virus signature database 12626 (20151126) __________
>> 
>> The message was checked by ESET Mail Security.
>> http://www.eset.com
>> 
>> 
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list