-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Looks like here:
Lines 147 to 156 in 17fb2c3
| uri = URI.parse(connection_url) | |
| opts = | |
| { | |
| host: uri.host, | |
| user: uri.user, | |
| password: uri.password, | |
| port: uri.port || 5432, | |
| dbname: uri.path[1..-1], | |
| } |
I'm trying to use this arg for the first time, and I end up getting a password failure. Is there another way I can provide this option? PG urls allow escaping special chars in the password, and this isn't working.
Actually, with a little experimentation, it really looks like PG::Connection.open is fully capable of parsing connection strings, without the URI.parse step. It appears that it handles both postgres:// URLs and connection strings like user=... password=... host=... dbname=....
So, AFAICT, the connection url option ought to be passed directly to PG::Connection.open.
I do see this, but I don't understand what it's for (I will check the docs):
Lines 189 to 194 in 17fb2c3
| unless connection_args.has_key?(:application_name) | |
| @connection.execute( | |
| "SELECT set_config('application_name', $1, false)", | |
| ["Que Locker: #{@connection.backend_pid}"] | |
| ) | |
| end |