I wrote: > I'm inclined to think we should indeed just nuke that test. It's > overcomplicated and it expends a lot of test cycles on a pretty > marginal feature.
Perhaps a better idea: at the start of the test, set postgres_fdw.application_name to something that exercises all the available escape sequences, but don't try to verify what the result looks like. That at least gives us code coverage for the escape sequence processing code, even if it doesn't prove that the output is desirable. regards, tom lane