pgsql: Doc: improve user docs and code comments about EXISTS(SELECT * .

2026-02-27 Thread Tom Lane
Doc: improve user docs and code comments about EXISTS(SELECT * ...). Point out that Postgres automatically optimizes away the target list of an EXISTS' subquery, except in weird cases such as target lists containing set-returning functions. Thus, both common conventions EXISTS(SELECT * FROM ...)

pgsql: Fix some -Wcast-qual warnings

2026-02-27 Thread Peter Eisentraut
Fix some -Wcast-qual warnings This fixes some warnings from -Wcast-qual that are easy to fix, without using unconstify or the like. Reviewed-by: Bertrand Drouvot Discussion: https://www.postgresql.org/message-id/990c9117-b013-4026-aaf5-261fe2832c3d%40eisentraut.org Branch -- master Detail

pgsql: Clean up nodes that are no longer of use in 007_pgdumpall.pl

2026-02-27 Thread Andrew Dunstan
Clean up nodes that are no longer of use in 007_pgdumpall.pl Oversight in commit 763aaa06f03. When nodes are going out of scope, we should stop the underlying postmasters rather than waiting for the script to end. Per gripe from Tom Lane Discussion: https://postgr.es/m/[email protected]

pgsql: Don't include proc.h in shm_mq.h

2026-02-27 Thread Álvaro Herrera
Don't include proc.h in shm_mq.h This prevents proliferation of proc.h to tons of other places; shm_mq.h is widely included. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a2c89835f5124f9a98e

pgsql: Use pg_malloc_object() and pg_alloc_array() variants in frontend

2026-02-27 Thread Michael Paquier
Use pg_malloc_object() and pg_alloc_array() variants in frontend code This commit updates the frontend tools (src/bin/, contrib/ and src/test/) to use the memory allocation variants based on pg_malloc_object() and pg_malloc_array() in various code paths. This does not cover all the allocations, b

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: postgres_fdw: Fix thinko in comment for UserMappingPasswordRequi

2026-02-27 Thread Etsuro Fujita
postgres_fdw: Fix thinko in comment for UserMappingPasswordRequired(). This commit also rephrases this comment to improve readability. Oversight in commit 6136e94dc. Reported-by: Etsuro Fujita Author: Andreas Karlsson Co-authored-by: Etsuro Fujita Discussion: https://postgr.es/m/CAPmGK16pDnM

pgsql: Don't flatten join alias Vars that are stored within a GROUP RTE

2026-02-27 Thread Tom Lane
Don't flatten join alias Vars that are stored within a GROUP RTE. The RTE's groupexprs list is used for deparsing views, and for that usage it must contain the original alias Vars; else we can get incorrect SQL output. But since commit 247dea89f, parseCheckAggregates put the GROUP BY expressions

pgsql: Don't flatten join alias Vars that are stored within a GROUP RTE

2026-02-27 Thread Tom Lane
Don't flatten join alias Vars that are stored within a GROUP RTE. The RTE's groupexprs list is used for deparsing views, and for that usage it must contain the original alias Vars; else we can get incorrect SQL output. But since commit 247dea89f, parseCheckAggregates put the GROUP BY expressions

pgsql: Centralize detection of x86 CPU features

2026-02-27 Thread John Naylor
Centralize detection of x86 CPU features We now maintain an array of booleans that indicate which features were detected at runtime. When code wants to check for a given feature, the array is automatically checked if it has been initialized and if not, a single function checks all features at once