Adjust postgres_fdw's search path handling.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6d06049493862f7f6b639035198fc817949723ae
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2013-02-22T11:04:49Z
Releases: 9.3.0
Adjust postgres_fdw's search path handling.

Set the remote session's search path to exactly "pg_catalog" at session
start, then schema-qualify only names that aren't in that schema.  This
greatly reduces clutter in the generated SQL commands, as seen in the
regression test changes.  Per discussion.

Also, rethink use of FirstNormalObjectId as the "built-in object" cutoff
--- FirstBootstrapObjectId is safer, since the former will accept
objects in information_schema for instance.

Files