qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.32k stars 2.97k forks source link

Connection details saved in QGIS Projects should align to the connection type used for PostGIS connections #38843

Open NyakudyaA opened 3 years ago

NyakudyaA commented 3 years ago

Problem

The PostgreSQL connection dialog allows access to the database through various methods.

Procedure

NB The order of connection is specified as Service name then Using Authentification

Since the layer connection parameters show that the connection was done using the service file which has the first preference, I expect the other connection parameters to be ignored. Currently, it ignores the Port and Host but adds the user and password credentials

geopkg

elpaso commented 3 years ago

Do you mean that it "uses" the supplied username and password instead of those specified by the service file? Because if you mean that username and password should not be stored in the data source I disagree: all information supplied by the user should be stored in the data source and in the project.

NyakudyaA commented 3 years ago

Do you mean that it "uses" the supplied username and password instead of those specified by the service file?

It connects using Service files.

Because if you mean that username and password should not be stored in the data source I disagree: all information supplied by the user should be stored in the data source and in the project.

Then the behavior is not consistent as it does not store all the credentials passed from the dialog. It skipped the port, host, from being stored in the project file

elpaso commented 3 years ago

Do you mean that it "uses" the supplied username and password instead of those specified by the service file?

It connects using Service files.

Because if you mean that username and password should not be stored in the data source I disagree: all information supplied by the user should be stored in the data source and in the project.

Then the behavior is not consistent as it does not store all the credentials passed from the dialog. It skipped the port, host, from being stored in the project file

I agree with that, I think that's the bug.