Here is a patch to refactor some macro hell in dblink.
This patch was discussed in the background sessions thread as a prerequisite for some work there, but I figure I'll make a separate thread for it to give everyone interested in dblink a chance to respond separate from the other thread.
+1
Any chance we can make get_connect_string() a core function or at least externally accessible?