<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list members -</p>
<p>I stumbled on something weird (for me at least): <br>
</p>
<p>If I run the following code in the Python console:</p>
<p><font face="monospace">metadata =
QgsProviderRegistry.instance().providerMetadata('postgres')<br>
conn = metadata.connections()<br>
for c in conn.keys(): print(c)</font><br>
</p>
<p>It shows me (as I would expect): A list of names of postgres
connections in QGIS.</p>
<p>However, if I 1) Make a <i>new</i> postgres connection and 2)
Rerun the same lines in the console, the new connection is <i>not</i>
shown in the list.</p>
<p>But if I restart QGIS and run the same code, the new connection
will be shown together with the older connections.</p>
<p>What gives ? Is there some kind of "refresh" method I've
overlooked??</p>
<p>Version: QGIS 3.20.3 on Windows 10.<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Med venlig hilsen / Kind regards
Bo Victor Thomsen</pre>
</body>
</html>