passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
146 stars 21 forks source link

Socket connection URL for postgresql #90

Closed abyth closed 8 years ago

abyth commented 9 years ago

The current connection URL approach has parsing issues when trying to connect to a PostgreSQL Server via Unix Domain Socket, because the host and database name are not separable ('/')

passiomatic commented 9 years ago

Could you give me an example? Thanks.

abyth commented 9 years ago

With the old configuration scheme this worked: hostname: /home/username/tmp username: username password: pw database: coldsweat The URL would look like this: postgresql://username:pw@/home/username/tmp/coldsweat

passiomatic commented 9 years ago

I see. Damn, I didn't think about the socket approach before ditching the connection parameters. Coldsweat could check for connection_url and then hostname/username/password/database options. Of course this defeats the purpose of the connection_url parameter, that is, simplify the code and configuration phase.

The other, painful way, is to maintain your branch of Coldsweat with the old connection method.