3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Semicolons in connection names are illegal but user is not informed #120

Closed effjot closed 1 year ago

effjot commented 2 years ago

When looking into #119, I realised that semicolons in connection names won’t work with PgMetadata, because the semicolon is used as a separator in the connection_names setting. But they can be added in the Set Connections tool I’d suggest the processing tool set_connections.py should tell the user that semicolons aren’t allowed and reject connecting the database. Should I prepare a PR?

Gustry commented 2 years ago

Maybe we should switch to a more complex separator ? Such as !!::!! ?

effjot commented 2 years ago

I don’t know if connection names with semicolon are really used, so just a warning in “set connections” should be enough. But maybe we could switch to | as a separator – still simple but not a commonly used punctuation character.

Gustry commented 2 years ago

I was proposing !!::!! because it's the one used by QGIS core, to separate items in a string ;-) I can try to make it.

effjot commented 2 years ago

Ah, I didn’t know that. Then this would be a good choice.