Closed develop7 closed 4 years ago
I agree, that is indeed hacky and shouldn't be needed. The best way to support this is probably to just allow using a plain connection string as an alternative to the current PGConnectInfo
, I guess? Coming up with a more structured representation sounds like overengineering to me.
According to https://www.postgresql.org/docs/12/libpq-connect.html#id-1.7.3.8.3.6, any part of a connection string is optional, which is not the case for the PGConnectInfo — host, port and dbname here are required. For instance, this renders connecting with simple
dbname=somedatabase
unfeasible, except maybe setting host and port to" "
which seems quite a hack to me.