[Qgis-developer] python function to upgrade qgs datasources?

Régis Haubourg regis.haubourg at eau-adour-garonne.fr
Wed Aug 20 08:57:09 PDT 2014


Andreas Neumann wrote
> Hi Régis,
> 
> I can't help you with the Python script to process your files, but I
> have a suggestion:
> 
> Use a PostgreSQL service instead of hard-coded IP addresses, names or
> aliases.
> 
> In such a scenario you can easily change between a production and test
> server and more easily migrate to a new machine. Also, on a laptop you
> can point the service to localhost (for mobile laptops) and within your
> organizations LAN you can point to the production server. All without
> touching the .qgs project file.
> 
> We in Uster are using PostgreSQL service names for several years now and
> I like them. Unfortunately the concept of PostgreSQL services is not
> very well-known among the PostgreSQL users.
> 
> See http://www.postgresql.org/docs/current/static/libpq-pgservice.html
> and
> http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
> 
> Andreas

Hi Andreas,
I'm struggling to have connection using service work here on windows. 
I tried putting a pg_service.conf file in AppData/postgres dir, or on a
location defined by environnement variable with no success. 

The content seems ok , but client (pgadmin, qgis) do not locate that file
correctly. Do you have any hint for us? Pg doc is light, and the web is
almost totally empty on that.

Régis




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/python-function-to-upgrade-qgs-datasources-tp5149022p5157372.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list