/*
* We use the expand_dbname parameter to process the connection string (or
- * URI), and pass some extra options. The deliberately undocumented
- * parameter "replication=true" makes it a replication connection. The
- * database name is ignored by the server in replication mode, but specify
- * "replication" for .pgpass lookup.
+ * URI), and pass some extra options.
*/
keys[i] = "dbname";
vals[i] = conninfo;
vals[i] = logical ? "database" : "true";
if (!logical)
{
+ /*
+ * The database name is ignored by the server in replication mode, but
+ * specify "replication" for .pgpass lookup.
+ */
keys[++i] = "dbname";
vals[i] = "replication";
}