Fix pg_dumpall on pre-8.1 servers

rolname did not exist in pg_shadow.

Backpatch to 9.3

Report by Andrew Gierth via IRC
Always use the same way to addres a descriptor in ecpg's regression tests.
Add OVERLAPS to index in the docs.

Per report from Adam Mackler and Jonathan Katz
Fix calculation of ISMN check digit.

This has always been broken, so back-patch to all supported versions.

Fabien COELHO
Fix possible buffer overrun in contrib/pg_trgm.

Allow for the possibility that folding a string to lower case makes it
longer (due to replacing a character with a longer multibyte character).
This doesn't change the number of trigrams that will be extracted, but
it does affect the required size of an intermediate buffer in
generate_trgm().  Per bug #8821 from Ufuk Kayserilioglu.

Also install some checks that the input string length is not so large
as to cause overflow in the calculations of palloc request sizes.

Back-patch to all supported versions.
Make bitmap heap scans show exact/lossy block info in EXPLAIN ANALYZE.

Etsuro Fujita
Code improvements for ALTER SYSTEM .. SET.

Move FreeConfigVariables() later to make sure ErrorConfFile is valid
when we use it, and get rid of an unnecessary string copy operation.

Amit Kapila, kibitzed by me.