postgres tables() and indexes() bug with multiple search_path entries

There is a bug in the postgres adapter that causes incorrect results
to be returned when there are multiple entries in the search path
(i.e., postgres "SHOW search_path"). This bug has been reported at
least 2 other times in the past (
5906 and It's a simple bug
where an space is being inadvertently added to a quoted query string.
My simple patch includes both test cases that demonstrate the problem
as well as the actual fix to the problem: