pg_dump:  avoid schema qualification for ALTER ... OWNER

We already use search_path to specify the schema, so there is no need
for pg_dump to schema-qualify the name.  Also remove dead code.
9.3 release notes:  move foreign table item

Move item about foreign data wrappers supporting inserts/updates/deletes
to object manipulation.

From Etsuro Fujita
Emit a log message if output is about to be redirected away from stderr.

We've seen multiple cases of people looking at the postmaster's original
stderr output to try to diagnose problems, not realizing/remembering that
their logging configuration is set up to send log messages somewhere else.
This seems particularly likely to happen in prepackaged distributions,
since many packagers patch the code to change the factory-standard logging
configuration to something more in line with their platform conventions.

In hopes of reducing confusion, emit a LOG message about this at the point
in startup where we are about to switch log output away from the original
stderr, providing a pointer to where to look instead.  This message will
appear as the last thing in the original stderr output.  (We might later
also try to emit such link messages when logging parameters are changed
on-the-fly; but that case seems to be both noticeably harder to do nicely,
and much less frequently a problem in practice.)

Per discussion, back-patch to 9.3 but not further.
Update Emacs configuration

Update emacs.samples with new configuration snippets that match pgindent
et al. formatting more accurately and follow Emacs Lisp best practices
better.

Add .dir-locals.el with a subset of that configuration for casual
editing and viewing.

Reviewed-by: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Reviewed-by: Noah Misch <noah@leadboat.com>
Remove Assert that matview is not in system schema from REFRESH.

We don't want to prevent an extension which creates a matview from
being installed in pg_catalog.

Issue was raised by Hitoshi Harada.
Backpatched to 9.3.
docs:  document TRIM "comma" syntax

This syntax is supported by the parser, but is non-standard.

_Not_ backpatched to 9.3 in case we change our minds.
Remove ph_may_need from PlaceHolderInfo, with attendant simplifications.

The planner logic that attempted to make a preliminary estimate of the
ph_needed levels for PlaceHolderVars seems to be completely broken by
lateral references.  Fortunately, the potential join order optimization
that this code supported seems to be of relatively little value in
practice; so let's just get rid of it rather than trying to fix it.

Getting rid of this allows fairly substantial simplifications in
placeholder.c, too, so planning in such cases should be a bit faster.

Issue noted while pursuing bugs reported by Jeremy Evans and Antonin
Houska, though this doesn't in itself fix either of their reported cases.
What this does do is prevent an Assert crash in the kind of query
illustrated by the added regression test.  (I'm not sure that the plan for
that query is stable enough across platforms to be usable as a regression
test output ... but we'll soon find out from the buildfarm.)

Back-patch to 9.3.  The problem case can't arise without LATERAL, so
no need to touch older branches.
Improve error message when view is not updatable

Avoid using the term "updatable" in confusing ways.  Suggest a trigger
first, before a rule.
Treat timeline IDs as unsigned in replication parser

Timeline IDs are unsigned ints everywhere, except the replication parser
treated them as signed ints.
Add tab completion for \dx in psql
Don't allow ALTER MATERIALIZED VIEW ADD UNIQUE.

Was accidentally allowed, but not documented and lacked support
for rename or drop once created.

Per report from Noah Misch.
Merge remote-tracking branch 'origin/master' into df_ordinality