Fix unportable use of isspace().

Introduced in commit 11a020eb6.
Support ALTER SYSTEM RESET command.

This patch allows us to execute ALTER SYSTEM RESET command to
remove the configuration entry from postgresql.auto.conf.

Vik Fearing, reviewed by Amit Kapila and me.
Add psql PROMPT variable showing which line of a statement is being edited.

The new %l substitution shows the line number inside a (potentially
multi-line) statement starting from one.

Author: Sawada Masahiko, heavily editorialized by me.
Reviewed-By: Jeevan Chalke, Alvaro Herrera
Silence warning on new versions of clang.

Andres Freund
Refactor per-page logic common to all redo routines to a new function.

Every redo routine uses the same idiom to determine what to do to a page:
check if there's a backup block for it, and if not read, the buffer if the
block exists, and check its LSN. Refactor that into a common function,
XLogReadBufferForRedo, making all the redo routines shorter and more
readable.

This has no user-visible effect, and makes no changes to the WAL format.

Reviewed by Andres Freund, Alvaro Herrera, Michael Paquier.
Check number of parameters in RAISE statement at compile time.

The number of % parameter markers in RAISE statement should match the number
of parameters given. We used to check that at execution time, but we have
all the information needed at compile time, so let's check it at compile
time instead. It's generally better to find mistakes earlier.

Marko Tiikkaja, reviewed by Fabien Coelho
Issue clearer notice when inherited merged columns are moved

CREATE TABLE INHERIT moves user-specified columns to the location of the
inherited column.

Report by Fatal Majid
Document use of partial indexes for partial unique constraints

Report by Tomáš Greif

Backpatch through 9.4
Update URL reference material in /contrib/isn docs

Report by Peter Eisentraut
Allow \watch to display query execution time if \timing is enabled.

Previously \watch could not display the query execution time even
when \timing was enabled because it used PSQLexec instead of
SendQuery and that function didn't support \timing. This patch
introduces PSQLexecWatch and changes \watch so as to use it, instead.
PSQLexecWatch is the function to run the query, print its results and
display how long it took (only when \timing is enabled).

This patch also changes --echo-hidden so that it doesn't print
the query that \watch executes. Since \watch cannot execute
backslash command queries, they should not be printed even
when --echo-hidden is set.

Patch by me, review by Heikki Linnakangas and Michael Paquier
Update comment to reflect commit 1d41739e5a04b0e93304d24d864b6bfa3efc45f2.

Peter Geoghegan
Fix segmentation fault that an empty prepared statement could cause.

Back-patch to all supported branches.

Per bug #11335 from Haruka Takatsuka
doc: Remove dead link

The link to the NIST web page about DES standards leads to nowhere, and
according to archive.org has been forwarded to an unrelated page for
many years.  Therefore, just remove that link.  More up to date
information can be found via Wikipedia, for example.
Add tab-completion for reloptions like user_catalog_table.

Back-patch to 9.4 where user_catalog_table was added.

Review by Michael Paquier
Assorted message fixes and improvements
Rename C variables in formatting.c, for clarity

Also add C comments.  This should help future debugging of this
notorious file.
Clarify documentation about "peer" rows in window functions

Peer rows are matching rows when ORDER BY is specified.

Report by arnaud.mouronval@gmail.com, David G Johnston
pg_upgrade:  preserve the timestamp epoch

This is useful for replication tools like Slony and Skytools.

Report by Sergey Konoplev
Report timezone offset in pg_dump/pg_dumpall

Use consistent format for all such displays.

Report by Gavin Flower
Properly document that -r is only honored from the command-line.

This is for postgres/postmaster options.

Report by Tom Lane

Backpatch through 9.4