Fix docs on lock level for ALTER TABLE VALIDATE

ALTER TABLE .. VALIDATE CONSTRAINT previously
gave incorrect details about lock levels and
therefore incomplete reasons to use the option.

Initial bug report and fix from Marko Tiikkaja
Reworded by me to include comments by Kevin Grittner
Merge branch 'master' into filter
Merge branch 'filter' into within_group
Merge branch 'within_group' of github.com:davidfetter/returning_before_after into within_group
Fix the create_index regression test for Danish collation.

In Danish collations, there are letter combinations which sort
higher than 'Z'.  A test for values > 'WA' was picking up rows
where the value started with 'AA', causing the test to fail.

Backpatch to 9.2, where the failing test was added.

Per report from Svenne Krap and analysis by Jeff Janes
Modernize entab source code
Remove halt.c, improve comments, rename manual page file.
Merge branch 'master' into filter
Support TB (terabyte) memory unit in GUC variables.

Patch by Simon Riggs, reviewed by Jeff Janes and me.
initdb: Add blank line before output about checksums

This maintains the logical grouping of the output better.
Further update CREATE FUNCTION documentation about argument names

More languages than SQL and PL/pgSQL actually support parameter names.
Merge branch 'master' into filter
Clarify terminology standalone backend vs. single-user mode

Most of the documentation uses "single-user mode", so use that in the
code as well.  Adjust the documentation to match the new error message
wording.  Also add a documentation index entry for "single-user mode".

Based-on-patch-by: Jeff Janes <jeff.janes@gmail.com>
fix silly mistake in expression_tree_walker

The walker() function must see the top level node of agg_filter; it's ok
to skip that for the other fields where the top level node is just List,
but agg_filter is a single Expr whose top-level node matters.
Added regression test for subquery in FILTER clause.
Changed array_agg() to sum() per Andrew Gierth's suggestion so as not to depend on ordering
Merge branch 'filter' into within_group
Merge branch 'within_group' of github.com:davidfetter/returning_before_after into within_group
doc: Fix date in EPUB manifest

If there is no <date> element, the publication date for the EPUB
manifest is taken from the copyright year.  But something like
"1996-2013" is not a legal date specification.  So the EPUB output
currently fails epubcheck.

Put in a separate <date> element with the current year.  Put it in
legal.sgml, because copyright.pl already instructs to update that
manually, so it hopefully won't be missed.
Ensure no xid gaps during Hot Standby startup

In some cases with higher numbers of subtransactions
it was possible for us to incorrectly initialize
subtrans leading to complaints of missing pages.

Bug report by Sergey Konoplev
Analysis and fix by Andres Freund
Add a comment warning against use of pg_usleep() for long sleeps.

Follow-up to commit 873ab97219caabeb2f7b390268a4fe01e2b7518c, in which
I noted that WaitLatch was a better solution in the commit log message,
but neglected to add any documentation in the code.