[QGIS-Developer] PostGIS credentials
Richard Duivenvoorde
rdmailings at duif.net
Tue Feb 16 05:39:03 PST 2021
On 2/16/21 2:35 PM, Paolo Cavallini wrote:
> Hi all,
> if an user copypaste PostGIS credentials in the New connection dialog,
> often it ends up with extra space(s) at the end of username, dbname, or
> passwd. This is not easy to spot, and ends up with a lot of useless
> frustration. Of course psql strips spaces, but qgis encloses each string
> with '', so it preserves the spaces. This is somewhat unavoidable, as
> the user may _want_ the trailing spaces. Therefore I suggest to show
> explicitly the spaces, e.g. with a coloured block, so the user can
> easily understand the source of error.
I do not think a sane user would want to end a username OR password with a space....
This is asking for issues, everywhere in your toolchain ...
Would it not be better to just 'strip' username,dbname and passwd? From trailing (and starting) whitespace?
Regards,
Richard Duivenvoorde
More information about the QGIS-Developer
mailing list