pgsql: meson: Add headerscheck and cpluspluscheck targets

2026-03-18 Thread Peter Eisentraut
meson: Add headerscheck and cpluspluscheck targets Author: MiƂosz Bieniek Co-authored-by: Peter Eisentraut Reviewed-by: Bilal Yavuz Discussion: https://www.postgresql.org/message-id/flat/CAMSWrt-PoQt4sHryWrB1ViuGBJF_PpbjoSGrWR2Ry47bHNLDqg%40mail.gmail.com Branch -- master Details ---

pgsql: meson: Add {perl|python}_includespec to generated Makefile.globa

2026-03-18 Thread Peter Eisentraut
meson: Add {perl|python}_includespec to generated Makefile.global This is meant to help enable headerscheck under meson, but can also be useful in general, for example for third-party extension that might use these values. Author: Nazir Bilal Yavuz Discussion: https://www.postgresql.org/message

pgsql: Enable -Wstrict-prototypes and -Wold-style-definition by default

2026-03-18 Thread Peter Eisentraut
Enable -Wstrict-prototypes and -Wold-style-definition by default Those are available in all gcc and clang versions that support C11 and as C11 is required as of f5e0186f865c, then we can add them without capability test. Having them enabled by default avoid having to chase these manually like 111

pgsql: Fix pg_dump for CREATE FOREIGN DATA WRAPPER ... CONNECTION.

2026-03-18 Thread Jeff Davis
Fix pg_dump for CREATE FOREIGN DATA WRAPPER ... CONNECTION. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b71bf3b8457027c445b5b3aa4914daa7e6718cf4 Modified Files -

pgsql: Exclude contrib/pg_plan_advice/pgpa_parser.h from headerscheck.

2026-03-18 Thread Tom Lane
Exclude contrib/pg_plan_advice/pgpa_parser.h from headerscheck. Like other Bison-written headers, it's not worth the trouble to make this compilable standalone. (We might revisit this someday, if we ever move up our minimum required Bison version.) Branch -- master Details --- https://g

pgsql: ALTER SUBSCRIPTION ... SERVER test.

2026-03-18 Thread Jeff Davis
ALTER SUBSCRIPTION ... SERVER test. Test ALTER SUBSCRIPTION ... SERVER and ALTER SUBSCRIPTION ... CONNECTION, including invalidation. Also run perltidy on the test file. Discussion: https://postgr.es/m/CAExHW5vV5znEvecX=ra2-v7ubj9-m6qvddzub78m-txbyd1...@mail.gmail.com Suggested-by: Ashutosh Bap

pgsql: Allow setting the collation strength in ICU tailoring rules

2026-03-18 Thread Peter Eisentraut
Allow setting the collation strength in ICU tailoring rules There was a bug that if you created an ICU collation with tailoring rules, any strength specification inside the rules was ignored. This was because we called ucol_openRules() with UCOL_DEFAULT_STRENGTH for the strength argument, which o

pgsql: ssl: Serverside SNI support for libpq

2026-03-18 Thread Daniel Gustafsson
ssl: Serverside SNI support for libpq Support for SNI was added to clientside libpq in 5c55dc8b4733 with the sslsni parameter, but there was no support for utilizing it serverside. This adds support for serverside SNI such that certificate/key handling is available per host. A new config file, $d

pgsql: ssl: Add tests for client CA

2026-03-18 Thread Daniel Gustafsson
ssl: Add tests for client CA These tests were originally written to test the SSL SNI patchset but they have merit on their own since we lack coverage for these scenarios in the non SNI case as well. Author: Jacob Champion Co-authored-by: Daniel Gustafsson Discussion: https://postgr.es/m/1c81cd0

pgsql: Update RELEASE_CHANGES

2026-03-18 Thread Peter Eisentraut
Update RELEASE_CHANGES The existing instructions did not cover meson. Point to src/common/unicode/README instead, where there is more information. Reviewed-by: Chao Li Discussion: https://www.postgresql.org/message-id/flat/2a668979-ed92-49a3-abf9-a3ec2d460ec2%40eisentraut.org Branch -- ma

pgsql: Implement unaccent Unicode data update in meson

2026-03-18 Thread Peter Eisentraut
Implement unaccent Unicode data update in meson The meson/ninja update-unicode target did not cover the required updates in contrib/unaccent/. This is fixed now. Reviewed-by: Chao Li Reviewed-by: Alexander Borisov Discussion: https://www.postgresql.org/message-id/flat/2a668979-ed92-49a3-abf9-

pgsql: pg_restore: Remove unnecessary strlen() calls in options parsing

2026-03-18 Thread Nathan Bossart
pg_restore: Remove unnecessary strlen() calls in options parsing. Unlike pg_dump and pg_dumpall, pg_restore first checks whether the argument passed to --format, --host, and --port is empty before setting the corresponding variable. Consequently, pg_restore does not error if given an empty format

pgsql: Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration

2026-03-18 Thread Tom Lane
Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration. When headerscheck compiles ecpglib_extern.h, POSTGRES_ECPG_INTERNAL is not defined, causing sqlca.h to expand "sqlca" as a macro (*ECPGget_sqlca()). This causes the ecpg_init_sqlca() declaration to trigger a -Wstrict-prototypes war

pgsql: ssl: Skip passphrase reload tests in EXEC_BACKEND builds

2026-03-18 Thread Daniel Gustafsson
ssl: Skip passphrase reload tests in EXEC_BACKEND builds SSL password command reloading must be enabled on Windows and in EXEC_BACKEND builds due to them always reloading the context. The new tests in commit 4f433025 skipped under Windows but missed the EXEC_BACKEND check. Reported by buildfarm m

pgsql: Add some const qualifiers enabled by typeof_unqual change on cop

2026-03-18 Thread Peter Eisentraut
Add some const qualifiers enabled by typeof_unqual change on copyObject The recent commit to change copyObject() to use typeof_unqual allows cleaning up some APIs to take advantage of this improved qualifier handling. EventTriggerCollectSimpleCommand() is a good example: It takes a node tree and

pgsql: test_saslprep: Test module for SASLprep()

2026-03-18 Thread Michael Paquier
test_saslprep: Test module for SASLprep() This module includes two functions: - test_saslprep(), that performs pg_saslprep on a bytea. - test_saslprep_ranges(), able to check for all valid ranges of UTF-8 codepoints pg_saslprep() handles each one of them. This provides a detailed coverage of our

pgsql: Short-circuit row estimation in NOT IN containing NULL consts

2026-03-18 Thread David Rowley
Short-circuit row estimation in NOT IN containing NULL consts ScalarArrayOpExpr used for either NOT IN or <>/= ALL, when the array contains a NULL constant, will never evaluate to true. Here we add an explicit short-circuit in scalararraysel() to account for this and return 0.0 rows when we see t

pgsql: test_saslprep: Apply proper indentation

2026-03-18 Thread Michael Paquier
test_saslprep: Apply proper indentation Noticed before koel has the idea to complain. Rebase thinko from commit aa73838a5c94. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/015d32016d845f8a29b3ec3ab7fa98a69cea1a0f Modified Files -- .../modules/test_sa

pgsql: Add commit 015d32016d84 to .git-blame-ignore-revs.

2026-03-18 Thread Michael Paquier
Add commit 015d32016d84 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/46fb08aff69fd293961ac57e9339aef85692 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: pg_plan_advice: Fix multiple copy-and-paste-errors in test case.

2026-03-18 Thread Robert Haas
pg_plan_advice: Fix multiple copy-and-paste-errors in test case. The second half of this file is meant to test feedback, not generated advice, and is meant to use the statements that it prepares, not leftover prepared statements from earlier in the file. These mistakes resulted in failures under

pgsql: doc: Clarify BUFFERS behavior without ANALYZE in EXPLAIN

2026-03-18 Thread Fujii Masao
doc: Clarify BUFFERS behavior without ANALYZE in EXPLAIN This commit clarifies the documentation for the BUFFERS option of EXPLAIN by explicitly describing its behavior when ANALYZE is not specified. Author: Ryo Matsumura Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/tyrpr01mb13457d

pgsql: Add more debugging information for bgworker termination tests of

2026-03-18 Thread Michael Paquier
Add more debugging information for bgworker termination tests of worker_spi widowbird has failed again after af8837a10bc7, with the same symptoms of a backend still lying around when attempting a database rename with a bgworker connected to the database being renamed. We are still not sure yet ho