pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: pgbench: Fail cleanly when finding a COPY result state

2025-10-02 Thread Michael Paquier
pgbench: Fail cleanly when finding a COPY result state Currently, pgbench aborts when a COPY response is received in readCommandResponse(). However, as PQgetResult() returns an empty result when there is no asynchronous result, through getCopyResult(), the logic done at the end of readCommandResp

pgsql: Add IGNORE NULLS/RESPECT NULLS option to Window functions.

2025-10-02 Thread Tatsuo Ishii
Add IGNORE NULLS/RESPECT NULLS option to Window functions. Add IGNORE NULLS/RESPECT NULLS option (null treatment clause) to lead, lag, first_value, last_value and nth_value window functions. If unspecified, the default is RESPECT NULLS which includes NULL values in any result calculation. IGNORE

pgsql: Add GROUP BY ALL.

2025-10-02 Thread Tom Lane
Add GROUP BY ALL. GROUP BY ALL is a form of GROUP BY that adds any TargetExpr that does not contain an aggregate or window function into the groupClause of the query, making it exactly equivalent to specifying those same expressions in an explicit GROUP BY list. This feature is useful for certain

pgsql: Make some use of anonymous unions [pg_locale_t]

2025-10-02 Thread Peter Eisentraut
Make some use of anonymous unions [pg_locale_t] Make some use of anonymous unions, which are allowed as of C11, as examples and encouragement for future code, and to test compilers. This commit changes the pg_locale_t type. Reviewed-by: Chao Li Discussion: https://www.postgresql.org/message-id

pgsql: Rename pg_builtin_integer_constant_p to pg_integer_constant_p

2025-10-02 Thread Peter Eisentraut
Rename pg_builtin_integer_constant_p to pg_integer_constant_p Since it's not builtin. Also fix a related typo. Reviewed-by: David Rowley Discussion: https://www.postgresql.org/message-id/flat/CAApHDvom02B_XNVSkvxznVUyZbjGAR%2B5myA89ZcbEd3%3DPA9UcA%40mail.gmail.com Branch -- master Detail

pgsql: pgstattuple: Improve reports generated for indexes (hash, gist,

2025-10-02 Thread Michael Paquier
pgstattuple: Improve reports generated for indexes (hash, gist, btree) pgstattuple checks the state of the pages retrieved for gist and hash using some check functions from each index AM, respectively gistcheckpage() and _hash_checkpage(). When these are called, they would fail when bumping on da

pgsql: Fix StatisticsObjIsVisibleExt() for pg_temp.

2025-10-02 Thread Noah Misch
Fix StatisticsObjIsVisibleExt() for pg_temp. Neighbor get_statistics_object_oid() ignores objects in pg_temp, as has been the standard for non-relation, non-type namespace searches since CVE-2007-2138. Hence, most operations that name a statistics object correctly decline to map an unqualified na

pgsql: Remove check for NULL in STRICT function

2025-10-02 Thread Daniel Gustafsson
Remove check for NULL in STRICT function test_bms_make_singleton is defined as STRICT and only takes a single parameter, so there is no need to check that parameter for NULL as a NULL input won't ever reach there. Author: Daniel Gustafsson Discussion: https://postgr.es/m/bc483901-9587-4076-b20f-

pgsql: Fixes for comments in test_bitmapset

2025-10-02 Thread Daniel Gustafsson
Fixes for comments in test_bitmapset This fixes a typo in the sql/expected test files and removes a leftover comment from test_bitmapset.c from when the functions invoked bms_free. Author: Daniel Gustafsson Reported-by: David Rowley Discussion: https://postgr.es/m/978d21e8-9d3b-40ea-a4b1-f87bab

pgsql: Improve docs syntax checking

2025-10-02 Thread Andrew Dunstan
Improve docs syntax checking Move the checks out of the Makefile into a perl script that can be called from both the Makefile and meson.build. The set of files checked is simplified, so it is just all the sgml and xsl files found in docs/src/sgml directory tree. Along the way make some adjustment

pgsql: doc: Improve wording for base64url definition

2025-10-02 Thread Daniel Gustafsson
doc: Improve wording for base64url definition This sentence should be "the alphabet uses" due to it referring to multiple cases of use. Reported-by: Erik Rijkers Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.post

Re: pgsql: Minor fixups of test_bitmapset.c

2025-10-02 Thread Michael Paquier
On Wed, Oct 01, 2025 at 05:50:52AM +, David Rowley wrote: > Minor fixups of test_bitmapset.c > > The macro's comment had become outdated from a prior version and there's > now no longer a need for the do/while loop (or my misplaced semi-colon). Oops, missed this spot. Thanks for this one. --

pgsql: Remove useless pointer update in ginxlog.c

2025-10-02 Thread Michael Paquier
Remove useless pointer update in ginxlog.c Oversight in 2c03216d8311, when the redo code of GIN got refactored for the new WAL format where block information has been standardized, as the payload data got tracked for each block after the change, and not in the whole record. This is just a cleanup