Open qgib opened 6 years ago
Author Name: jd lom (@lejedi76)
A better solution is to use the authentication system with basic authentication:
https://docs.qgis.org/2.14/fr/docs/user_manual/auth_system/auth_overview.html
Change the id of the autentication with something like 0000000
Your layer source should be :
dbname='pvz1' biomon.com port=5432 sslmode=disable authcfg=0000000 key='pkuid' srid=3346 type=Point table="public"."dirvinis_sejikas" (geometrija) sql=
Do this on every client.
Best regards,
In our workflow, this will be useful as we have multiple PostgreSQL layers defined based on WHERE county_name = 'some_text'
and to do analysis for a different county, currently we have to swap the county name in each layer individually or through python. If project variables are allowed in SQL query, we can just change the variable value in the project setting and switch analysis and all layers to a different county.
@ar-siddiqui - there is a QGIS plugin available for that:
https://plugins.qgis.org/plugins/qgis-subset-expression-plugin/
Description at https://github.com/elpaso/qgis-subset-expression-plugin
Author Name: Pranas Slezas (Pranas Slezas) Original Redmine Issue: 18995
Redmine category:gui
use variable in layer source
We using qGis layer and can not use variable in source. We would use this feature for authentication. User can add project variables and then this variables can be used in layer source (connection)
Example dbname='pvz1' host=biomon.com port=5432 user=@user password=@password sslmode=disable key='pkuid' srid=3346 type=Point table="public"."dirvinis_sejikas" (geometrija) sql=