pgsql: Remove Value node struct

2021-09-08 Thread Peter Eisentraut
Remove Value node struct The Value node struct is a weird construct. It is its own node type, but most of the time, it actually has a node type of Integer, Float, String, or BitString. As a consequence, the struct name and the node type don't match most of the time, and so it has to be treated s

pgsql: Remove useless casts

2021-09-08 Thread Peter Eisentraut
Remove useless casts Casting the argument of strVal() to (Value *) is useless, since strVal() already does that. Most code didn't do that anyway; this was apparently just a style that snuck into certain files. Reviewed-by: Dagfinn Ilmari Mannsåker Reviewed-by: Kyotaro Horiguchi Discussion: ht

pgsql: Make shared_memory_size a preset option

2021-09-08 Thread Michael Paquier
Make shared_memory_size a preset option bd17880 set up that as a memory parameter, but the docs told a different story. A preset parameter is adapted here, as this option is compiled at startup time. Reported-by: Fujii Masao Discussion: https://postgr.es/m/4cc5b434-b174-9aae-197b-737db6cac...@o

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Avoid useless malloc/free traffic around getFormattedTypeName().

2021-09-08 Thread Tom Lane
Avoid useless malloc/free traffic around getFormattedTypeName(). Coverity complained that one caller of getFormattedTypeName() failed to free the returned string. Which is true, but rather than fixing that one, let's get rid of this tedious and error-prone requirement. Now that getFormattedTypeNa

pgsql: Fix misleading comments about TOAST access macros.

2021-09-08 Thread Tom Lane
Fix misleading comments about TOAST access macros. Seems to have been my error in commit aeb1631ed. Noted by Christoph Berg. Discussion: https://postgr.es/m/[email protected] Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/67948a433e18a8561daf89d

pgsql: Fix misleading comments about TOAST access macros.

2021-09-08 Thread Tom Lane
Fix misleading comments about TOAST access macros. Seems to have been my error in commit aeb1631ed. Noted by Christoph Berg. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/490798451a3adc32b71b30e285bd99

pgsql: In psql tab completion, offer spelled-out commands not abbreviat

2021-09-08 Thread Tom Lane
In psql tab completion, offer spelled-out commands not abbreviations. Various psql backslash commands have both single-letter and long forms, for example \e and \edit. Previously, tab completion generally offered the single-letter form but not the long form. It seems more sensible to offer the lo

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Fix rewriter to set hasModifyingCTE correctly on rewritten queri

2021-09-08 Thread Tom Lane
Fix rewriter to set hasModifyingCTE correctly on rewritten queries. If we copy data-modifying CTEs from the original query to a replacement query (from a DO INSTEAD rule), we must set hasModifyingCTE properly in the replacement query. Failure to do this can cause various unpleasantness, such as u

pgsql: Consistently use "superuser" instead of "super user"

2021-09-08 Thread Daniel Gustafsson
Consistently use "superuser" instead of "super user" The correct nomenclature for the highest privileged user is superuser and not "super user", this replaces the few instances where that was used erroneously. No user-visible changes are done as all changes are in comments, so no back-patching. A

pgsql: Fix typo

2021-09-08 Thread Peter Eisentraut
Fix typo Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7390b6421a98b70554b6b5edea5d6e012dfdbbba Modified Files -- src/backend/utils/adt/jsonfuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: Disable anonymous record hash support except in special cases

2021-09-08 Thread Peter Eisentraut
Disable anonymous record hash support except in special cases Commit 01e658fa74 added hash support for row types. This also added support for hashing anonymous record types, using the same approach that the type cache uses for comparison support for record types: It just reports that it works, bu

pgsql: Disable anonymous record hash support except in special cases

2021-09-08 Thread Peter Eisentraut
Disable anonymous record hash support except in special cases Commit 01e658fa74 added hash support for row types. This also added support for hashing anonymous record types, using the same approach that the type cache uses for comparison support for record types: It just reports that it works, bu

pgsql: postgres_fdw: Revert unstable tests for postgres_fdw.application

2021-09-08 Thread Fujii Masao
postgres_fdw: Revert unstable tests for postgres_fdw.application_name. Commit 449ab63505 added the tests that check that postgres_fdw.application_name GUC works as expected. But they were unstable and caused some buildfarm members to report the failure. This commit reverts those unstable tests. R