Terry Lee Tucker <terry(at)chosen-ones(dot)org> writes:
> Is there a way to get hold of an environment variable such that it can be
> referenced in postgresql.conf?
No, but you could perhaps set that GUC on the postmaster command line
instead.
postmaster ... --dynamic_library_path="$SOURCE:$$libdir"
regards, tom lane