QGIS: How to change the "application_name" of a PostGIS-connection?

المشرف العام

Administrator
طاقم الإدارة
PostGIS offers a view called pg_stat_activity, where you can see all the active connections to the database. This view includes the interesting column application_name. When a connection comes from a QGIS instance, the text "QGIS" appears there.

An application can send this parameter to PostGIS in the connection string, and I suppose that QGIS do it so. The connection string looks than more or less like that:

host=... port=... dbname=... user=... password=... application_name=QGIS

I would like to change this value in QGIS to include the username (that I will get from the operating system). Instead of "QGIS", I would like to see something like "QGIS for user1". Is there a was to do that, may be by changing the connection string using a pyQGIS script or any other solution?



أكثر...
 
أعلى