Re: pgsql: Silence some Coverity warnings and improve code consistency.

2021-04-12 Thread Peter Eisentraut
On 11.04.21 23:02, Tom Lane wrote: ... or more accurately, with an LL constant, which is not project style. Make all of these use INT64CONST(), as we do elsewhere. I think this style could be considered obsolete because C99 requires LL constants, and configure checks for it.

pgsql: Support tab-complete for TRUNCATE on foreign tables.

2021-04-12 Thread Fujii Masao
Support tab-complete for TRUNCATE on foreign tables. Commit 8ff1c94649 extended TRUNCATE command so that it can also truncate foreign tables. But it forgot to support tab-complete for TRUNCATE on foreign tables. That is, previously tab-complete for TRUNCATE displayed only the names of regular tabl

pgsql: Fix files references in nls.mk

2021-04-12 Thread Peter Eisentraut
Fix files references in nls.mk broken by 37d2ff38031262a1778bc76a9c55fff7afbcf275 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/44c8a3d75997b08fa7645dac7ee5c7a918a235c7 Modified Files -- src/bin/pg_rewind/nls.mk | 2 +- 1 file changed, 1 insertion(+),

Re: pgsql: Silence some Coverity warnings and improve code consistency.

2021-04-12 Thread Tom Lane
Peter Eisentraut writes: > On 11.04.21 23:02, Tom Lane wrote: >> ... or more accurately, with an LL constant, which is not project >> style. Make all of these use INT64CONST(), as we do elsewhere. > I think this style could be considered obsolete because C99 requires LL > constants, and configu

Re: pgsql: SQL-standard function body

2021-04-12 Thread Peter Eisentraut
On 10.04.21 03:38, Laurenz Albe wrote: On Fri, 2021-04-09 at 19:44 +0200, I wrote: SQL-standard function body psql needs some new intelligence to keep track of function body boundaries so that it doesn't send off statements when it sees semicolons that are inside a function body. This causes

pgsql: pg_amcheck: Add basic NLS support

2021-04-12 Thread Peter Eisentraut
pg_amcheck: Add basic NLS support Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fc0fefbfe0d7e805f6a3a4d7127090fcca51 Modified Files -- src/bin/pg_amcheck/nls.mk | 7 +++ src/bin/pg_amcheck/pg_amcheck.c | 114 -

pgsql: pg_upgrade: Print OID using %u instead of %d

2021-04-12 Thread Peter Eisentraut
pg_upgrade: Print OID using %u instead of %d This could write wrong output into the cluster deletion script if a database OID exceeds the signed 32-bit range. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6787e53fe59eed19095c771a8d3323fb59420733 Modified Files --

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

pgsql: Fix old bug with coercing the result of a COLLATE expression.

2021-04-12 Thread Tom Lane
Fix old bug with coercing the result of a COLLATE expression. There are hacks in parse_coerce.c to push down a requested coercion to below any CollateExpr that may appear. However, we did that even if the requested data type is non-collatable, leading to an invalid expression tree in which Collat

Re: pgsql: SQL-standard function body

2021-04-12 Thread Laurenz Albe
On Mon, 2021-04-12 at 17:25 +0200, Peter Eisentraut wrote: > On 10.04.21 03:38, Laurenz Albe wrote: > > On Fri, 2021-04-09 at 19:44 +0200, I wrote: > > > > SQL-standard function body > > > > > > > > psql needs some new intelligence to keep track of function body > > > > boundaries so that it doesn

pgsql: Remove no-longer-relevant test case.

2021-04-12 Thread Tom Lane
Remove no-longer-relevant test case. collate.icu.utf8.sql was exercising the recording of a collation dependency for an enum comparison expression, but such an expression should never have had any collation dependency in the first place. After I fixed that in commit c402b02b9, the test started fai

pgsql: Remove duplicated --no-sync switches in new tests of test_pg_dum

2021-04-12 Thread Michael Paquier
Remove duplicated --no-sync switches in new tests of test_pg_dump These got introduced in 6568cef. Reported-by: Noah Misch Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/885a87641930778d9580f

Re: pgsql: Add some information about authenticated identity via log_connec

2021-04-12 Thread Michael Paquier
On Fri, Apr 09, 2021 at 10:12:51AM +0900, Michael Paquier wrote: > I have been keeping an eye on fairywren since yesterday to see if this > failure is completely taken care of, but it has not reported yet. > Andrew, is this animal alive? FYI, fairywren has reported back and is now green: https://b

pgsql: Fix potential SSI hazard in heap_update().

2021-04-12 Thread Thomas Munro
Fix potential SSI hazard in heap_update(). Commit 6f38d4dac38 failed to heed a warning about the stability of the value pointed to by "otid". The caller is allowed to pass in a pointer to newtup->t_self, which will be updated during the execution of the function. Instead, the SSI check should us

pgsql: Fix potential SSI hazard in heap_update().

2021-04-12 Thread Thomas Munro
Fix potential SSI hazard in heap_update(). Commit 6f38d4dac38 failed to heed a warning about the stability of the value pointed to by "otid". The caller is allowed to pass in a pointer to newtup->t_self, which will be updated during the execution of the function. Instead, the SSI check should us

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e3ac7d17616b6baea12d21

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/72a9bd04780449fcabebce

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c3556f6fac349b31da2fd00107469

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/766c8fce5281f8a7cf690e

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Use "-I." in directories holding Bison parsers, for Oracle compi

2021-04-12 Thread Noah Misch
Use "-I." in directories holding Bison parsers, for Oracle compilers. With the Oracle Developer Studio 12.6 compiler, #line directives alter the current source file location for purposes of #include "..." directives. Hence, a VPATH build failed with 'cannot find include file: "specscanner.c"'. W

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4a3de4092b2f5b53d325f5

pgsql: Port regress-python3-mangle.mk to Solaris "sed".

2021-04-12 Thread Noah Misch
Port regress-python3-mangle.mk to Solaris "sed". It doesn't support "\(foo\)*" like a POSIX "sed" implementation does; see the Autoconf manual. Back-patch to 9.6 (all supported versions). Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/14652a19feab4d1cf0c637

pgsql: doc: Fix typo in logicaldecoding.sgml.

2021-04-12 Thread Fujii Masao
doc: Fix typo in logicaldecoding.sgml. Introduced in commit 0aa8a01d04. Author: Peter Smith Discussion: https://postgr.es/m/cahut+ps8rkvhkwyjg09fb1pavg5-ehoftfj9ozmf4hpzdsx...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5fe83adad9efd5e3929f0465b