pgsql: Update to DocBook 4.5

2019-08-12 Thread Peter Eisentraut
Update to DocBook 4.5 This moves us to the latest minor version of DocBook 4. It requires no markup changes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/416c75cf38fbf58f4589fb27b520b64092a7ceff Modified Files -- configure

pgsql: Fix inconsistencies and typos in the tree, take 10

2019-08-12 Thread Michael Paquier
Fix inconsistencies and typos in the tree, take 10 This addresses some issues with unnecessary code comments, fixes various typos in docs and comments, and removes some orphaned structures and definitions. Author: Alexander Lakhin Discussion: https://postgr.es/m/9aabc775-5494-b372-8bcb-4dfc0bd37.

pgsql: Fix random regression failure in test case "temp"

2019-08-12 Thread Michael Paquier
Fix random regression failure in test case "temp" This test case could fail because of an incorrect result ordering when looking up at pg_class entries. This commit adds an ORDER BY to the culprit query. The cause of the failure was likely caused by a plan switch. By default, the planner would

pgsql: Fix random regression failure in test case "temp"

2019-08-12 Thread Michael Paquier
Fix random regression failure in test case "temp" This test case could fail because of an incorrect result ordering when looking up at pg_class entries. This commit adds an ORDER BY to the culprit query. The cause of the failure was likely caused by a plan switch. By default, the planner would

pgsql: Fix random regression failure in test case "temp"

2019-08-12 Thread Michael Paquier
Fix random regression failure in test case "temp" This test case could fail because of an incorrect result ordering when looking up at pg_class entries. This commit adds an ORDER BY to the culprit query. The cause of the failure was likely caused by a plan switch. By default, the planner would

pgsql: Fix random regression failure in test case "temp"

2019-08-12 Thread Michael Paquier
Fix random regression failure in test case "temp" This test case could fail because of an incorrect result ordering when looking up at pg_class entries. This commit adds an ORDER BY to the culprit query. The cause of the failure was likely caused by a plan switch. By default, the planner would

pgsql: amcheck: Skip unlogged relations during recovery.

2019-08-12 Thread Peter Geoghegan
amcheck: Skip unlogged relations during recovery. contrib/amcheck failed to consider the possibility that unlogged relations will not have any main relation fork files when running in hot standby mode. This led to low-level "can't happen" errors that complain about the absence of a relfilenode fi

pgsql: amcheck: Skip unlogged relations during recovery.

2019-08-12 Thread Peter Geoghegan
amcheck: Skip unlogged relations during recovery. contrib/amcheck failed to consider the possibility that unlogged relations will not have any main relation fork files when running in hot standby mode. This led to low-level "can't happen" errors that complain about the absence of a relfilenode fi

pgsql: amcheck: Skip unlogged relations during recovery.

2019-08-12 Thread Peter Geoghegan
amcheck: Skip unlogged relations during recovery. contrib/amcheck failed to consider the possibility that unlogged relations will not have any main relation fork files when running in hot standby mode. This led to low-level "can't happen" errors that complain about the absence of a relfilenode fi

pgsql: amcheck: Skip unlogged relations during recovery.

2019-08-12 Thread Peter Geoghegan
amcheck: Skip unlogged relations during recovery. contrib/amcheck failed to consider the possibility that unlogged relations will not have any main relation fork files when running in hot standby mode. This led to low-level "can't happen" errors that complain about the absence of a relfilenode fi

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_6_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_4_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL_10_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_5_STABLE Details --- https://git.postgresq

pgsql: Fix planner's test for case-foldable characters in ILIKE with IC

2019-08-12 Thread Tom Lane
Fix planner's test for case-foldable characters in ILIKE with ICU. As coded, the ICU-collation path in pattern_char_isalpha() failed to consider regular ASCII letters to be case-varying. This led to like_fixed_prefix treating too much of an ILIKE pattern as being a fixed prefix, so that indexscan

pgsql: Fix planner's test for case-foldable characters in ILIKE with IC

2019-08-12 Thread Tom Lane
Fix planner's test for case-foldable characters in ILIKE with ICU. As coded, the ICU-collation path in pattern_char_isalpha() failed to consider regular ASCII letters to be case-varying. This led to like_fixed_prefix treating too much of an ILIKE pattern as being a fixed prefix, so that indexscan

pgsql: Fix planner's test for case-foldable characters in ILIKE with IC

2019-08-12 Thread Tom Lane
Fix planner's test for case-foldable characters in ILIKE with ICU. As coded, the ICU-collation path in pattern_char_isalpha() failed to consider regular ASCII letters to be case-varying. This led to like_fixed_prefix treating too much of an ILIKE pattern as being a fixed prefix, so that indexscan

pgsql: Fix planner's test for case-foldable characters in ILIKE with IC

2019-08-12 Thread Tom Lane
Fix planner's test for case-foldable characters in ILIKE with ICU. As coded, the ICU-collation path in pattern_char_isalpha() failed to consider regular ASCII letters to be case-varying. This led to like_fixed_prefix treating too much of an ILIKE pattern as being a fixed prefix, so that indexscan

pgsql: Remove EState.es_range_table_array.

2019-08-12 Thread Tom Lane
Remove EState.es_range_table_array. Now that list_nth is O(1), there's no good reason to maintain a separate array of RTE pointers rather than indexing into estate->es_range_table. Deleting the array doesn't save all that much either; but just on cleanliness grounds, it's better not to have dupli

pgsql: Rationalize use of list_concat + list_copy combinations.

2019-08-12 Thread Tom Lane
Rationalize use of list_concat + list_copy combinations. In the wake of commit 1cff1b95a, the result of list_concat no longer shares the ListCells of the second input. Therefore, we can replace "list_concat(x, list_copy(y))" with just "list_concat(x, y)". To improve call sites that were list_cop