Dave Page <dpage@pgadmin.org> writes:
> Looking further, I think this might be quite clean:
> - Add a precedence flag to PQconninfoOption
> - In conninfo_parse, in the section that grabs the envvars for empty
> params, modify the logic to override any existing values if a value is
> set in the environment and the precedence flag is set for that option.
> That may be useful in the future for other options, and will certainly
> be less ugly than special casing one setting.
Changing PQconninfoOption would be an ABI break necessitating a soname
bump and recompiling all libpq-using applications. If there were a
significant probability that we'd have additional options in future that
should act this way, it might be worth it. But I don't think there is.
The approach with two different conninfo options is really probably the
logically cleanest answer short of an ABI break.
regards, tom lane