pgsql: Fix pg_amcheck --skip option parameter handling

2021-08-18 Thread Daniel Gustafsson
Fix pg_amcheck --skip option parameter handling The skip options set for all-visible and all-frozen were incorrect as they used space rather than hyphen, causing a syntax error when invoked. Also, the option for not skipping any pages at all, none, was documented but not implemented. Backpatch th

pgsql: Fix pg_amcheck --skip option parameter handling

2021-08-18 Thread Daniel Gustafsson
Fix pg_amcheck --skip option parameter handling The skip options set for all-visible and all-frozen were incorrect as they used space rather than hyphen, causing a syntax error when invoked. Also, the option for not skipping any pages at all, none, was documented but not implemented. Backpatch th

pgsql: Doc: Fix typo in logical decoding example

2021-08-18 Thread Daniel Gustafsson
Doc: Fix typo in logical decoding example Fixes one occurrence of "atleast" in the logical decoding example section. Discussion: https://postgr.es/m/5467e625-1369-48cf-be62-3bb69395c...@yesql.se Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/76987bad3380be862ea3cc

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Fix check_agg_arguments' examination of aggregate FILTER clauses

2021-08-18 Thread Tom Lane
Fix check_agg_arguments' examination of aggregate FILTER clauses. Recursion into the FILTER clause was mis-implemented, such that a relevant Var or Aggref at the very top of the FILTER clause would be ignored. (Of course, that'd have to be a plain boolean Var or boolean-returning aggregate.) The

pgsql: Revert refactoring of hex code to src/common/

2021-08-18 Thread Michael Paquier
Revert refactoring of hex code to src/common/ This is a combined revert of the following commits: - c3826f8, a refactoring piece that moved the hex decoding code to src/common/. This code was cleaned up by aef8948, as it originally included no overflow checks in the same way as the base64 routine

pgsql: Revert refactoring of hex code to src/common/

2021-08-18 Thread Michael Paquier
Revert refactoring of hex code to src/common/ This is a combined revert of the following commits: - c3826f8, a refactoring piece that moved the hex decoding code to src/common/. This code was cleaned up by aef8948, as it originally included no overflow checks in the same way as the base64 routine

pgsql: Improve performance of float overflow checks in btree_gist

2021-08-18 Thread Michael Paquier
Improve performance of float overflow checks in btree_gist The current code could do unnecessary calls to isinf() (two for the argument values all the time while one could be sufficient in some cases). zero_is_valid was never used but the result value was still checked on 0 in the first position

Re: pgsql: Allow a multi-row INSERT to specify DEFAULTs for a generated col

2021-08-18 Thread Laurenz Albe
On Sun, 2020-11-22 at 20:48 +, Tom Lane wrote: > Allow a multi-row INSERT to specify DEFAULTs for a generated column. > > One can say "INSERT INTO tab(generated_col) VALUES (DEFAULT)" and not > draw an error. But the equivalent case for a multi-row VALUES list > always threw an error, even if

Re: pgsql: Allow a multi-row INSERT to specify DEFAULTs for a generated col

2021-08-18 Thread Tom Lane
Laurenz Albe writes: > On Sun, 2020-11-22 at 20:48 +, Tom Lane wrote: >> Allow a multi-row INSERT to specify DEFAULTs for a generated column. > Shouldn't this be backpatched? > That seems like a clear bug to me; see this report on v11: > https://stackoverflow.com/q/68834080/6464308 https://w

pgsql: Fix typo in protocol.sgml.

2021-08-18 Thread Amit Kapila
Fix typo in protocol.sgml. The 'Stream Stop' message is misspelled as 'Stream End' in the docs. Author: Masahiko Sawada Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xjfuvihn...@mail.gmail.com Branch -- REL_14_STABLE

pgsql: Fix typo in protocol.sgml.

2021-08-18 Thread Amit Kapila
Fix typo in protocol.sgml. The 'Stream Stop' message is misspelled as 'Stream End' in the docs. Author: Masahiko Sawada Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xjfuvihn...@mail.gmail.com Branch -- master Details

pgsql: Rename LOGICAL_REP_MSG_STREAM_END to LOGICAL_REP_MSG_STREAM_STOP

2021-08-18 Thread Amit Kapila
Rename LOGICAL_REP_MSG_STREAM_END to LOGICAL_REP_MSG_STREAM_STOP. In the code, most places used the term "Stream Stop" for the logical stream message. This commit improves consistency by renaming LogicalRepMsgType "LOGICAL_REP_MSG_STREAM_END" to "LOGICAL_REP_MSG_STREAM_STOP". Author: Masahiko Saw