pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
to do this can silently break replication. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
to do this can silently break replication. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix compiler error introduced by 5386bfb9c1f.

2025-09-04 Thread Dean Rasheed
Fix compiler error introduced by 5386bfb9c1f. Per buildfarm member wrasse, void function cannot return a value. This only affects v13-v17, where an ABI-compatible wrapper function was added. Backpatch-through: 13-17 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix replica identity check for MERGE.

2025-09-04 Thread Dean Rasheed
to do this can silently break replication. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
signature. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 13 Branch -- master Details --- https

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
signature. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 13 Branch -- REL_14_STABLE Details --- https

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
signature. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 13 Branch -- REL_13_STABLE Details --- https

pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE.

2025-09-04 Thread Dean Rasheed
signature. Author: Zhijie Hou Reviewed-by: Ashutosh Bapat Reviewed-by: Dean Rasheed Tested-by: Chao Li Discussion: https://postgr.es/m/os3pr01mb57180c87e43a679a730482df94...@os3pr01mb5718.jpnprd01.prod.outlook.com Backpatch-through: 13 Branch -- REL_17_STABLE Details --- https

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/533211ded37aed55c715e9e237209a3deef4

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/afe38fb6abb8ef364191201f577a5a638ba5

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a85eddab23f17bce333d7d9481f528d7ba78

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7e86da539d18bc29377a3882b9945dfbeb37

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/22424953cded3f83f0382383773eaf36eb1abda9 Modified File

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg/commitdiff/64f77c6a65cb6a0731e59acbfab1dd1663b1

pgsql: Fix security checks in selectivity estimation functions.

2025-08-14 Thread Dean Rasheed
to be checked by the selectivity estimation functions. Author: Dean Rasheed Reviewed-by: Tom Lane Reviewed-by: Noah Misch Backpatch-through: 13 Security: CVE-2025-8713 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/415badc138189a6ecfe3b664dc900af74134

pgsql: Extend int128.h to support more numeric code.

2025-08-07 Thread Dean Rasheed
those work more generally would require rolling our own higher precision 128-bit division, which isn't supported for now. Author: Dean Rasheed Reviewed-by: John Naylor Discussion: https://postgr.es/m/caezatcwgbmc9zwkmyqqpaqz2x6gaamyrb+rnmsuncdmcl2m...@mail.gmail.com Branch -- m

pgsql: Simplify non-native 64x64-bit multiplication in int128.h.

2025-08-07 Thread Dean Rasheed
, leading to more compact and efficient code. The actual performance gain is quite modest, but it seems worth it to improve the code's readability. Author: Dean Rasheed Reviewed-by: John Naylor Discussion: https://postgr.es/m/caezatcwgbmc9zwkmyqqpaqz2x6gaamyrb+rnmsuncdmcl2m...@mail.gmai

pgsql: Optimise non-native 128-bit addition in int128.h.

2025-08-07 Thread Dean Rasheed
for carry in int128_add_int64() can be written in much the same way, but with an extra term to compensate for the sign of the value being added. Again, on modern compilers this leads to branchless code, often identical to the native 128-bit integer addition machine code. Author: Dean Rasheed Reviewed-by

pgsql: Refactor int128.h, bringing the native and non-native code toget

2025-08-06 Thread Dean Rasheed
separate parts of the file. This improves readability and maintainability, making it easier to compare the native and non-native implementations, and avoiding the need to duplicate every function comment and declaration. Author: Dean Rasheed Reviewed-by: John Naylor Discussion: https://postgr.es

pgsql: Fix printf format specfiers in test_int128 module.

2025-08-06 Thread Dean Rasheed
Fix printf format specfiers in test_int128 module. Compiler warnings introduced by 8c7445a0081. Author: Dean Rasheed Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/811633105a38bc40ff2f75879a4b9a1113bb0347 Modified Files -- src/test/modules

pgsql: Convert src/tools/testint128.c into a test module.

2025-08-06 Thread Dean Rasheed
ver setting and checking half of each 128-bit integer value. Author: Dean Rasheed Reviewed-by: John Naylor Discussion: https://postgr.es/m/caezatcwgbmc9zwkmyqqpaqz2x6gaamyrb+rnmsuncdmcl2m...@mail.gmail.com Branch -- master Details --- https://git.postgresql.or

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_17_STABLE Details --- https

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_14_STABLE Details --- https

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_15_STABLE Details --- https

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_13_STABLE Details --- https

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_16_STABLE Details --- https

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Fix typo in create_index.sql.

2025-08-04 Thread Dean Rasheed
Fix typo in create_index.sql. Introduced by 578b229718e. Author: Dean Rasheed Reviewed-by: Tender Wang Discussion: https://postgr.es/m/caezatcv_czrsopmf1gbhq7xtmyrv6ke7vicbd6b81wf7gft...@mail.gmail.com Backpatch-through: 13 Branch -- REL_18_STABLE Details --- https

pgsql: Fix concurrent update trigger issues with MERGE in a CTE.

2025-07-18 Thread Dean Rasheed
in v17 (though not in v18, which is still in beta). Bug: #18986 Reported-by: Yaroslav Syrytsia Author: Dean Rasheed Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/18986-e7a8aac3d339f...@postgresql.org Backpatch-through: 17 Branch -- REL_18_STABLE Details ---

pgsql: Fix concurrent update trigger issues with MERGE in a CTE.

2025-07-18 Thread Dean Rasheed
in v17 (though not in v18, which is still in beta). Bug: #18986 Reported-by: Yaroslav Syrytsia Author: Dean Rasheed Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/18986-e7a8aac3d339f...@postgresql.org Backpatch-through: 17 Branch -- REL_17_STABLE Details ---

pgsql: Fix concurrent update trigger issues with MERGE in a CTE.

2025-07-18 Thread Dean Rasheed
in v17 (though not in v18, which is still in beta). Bug: #18986 Reported-by: Yaroslav Syrytsia Author: Dean Rasheed Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/18986-e7a8aac3d339f...@postgresql.org Backpatch-through: 17 Branch -- master Details --- https://git.postgresql.

pgsql: doc: Updates for RETURNING OLD/NEW.

2025-06-26 Thread Dean Rasheed
doc: Updates for RETURNING OLD/NEW. Fix a couple of sentences in the documentation that were missed in commit 80feb727c8. Author: Dean Rasheed Reviewed-by: Robert Treat Discussion: https://postgr.es/m/caezatcucqadjuapzsjpf2b6hfj6agouwefrvh8ht3uzoqqw...@mail.gmail.com Branch -- master

pgsql: doc: Fix indentation of MERGE synopsis.

2025-06-26 Thread Dean Rasheed
doc: Fix indentation of MERGE synopsis. The convention in the documentation for other SQL commands is to indent continuation lines and sub-clauses in the "Synopsis" section by 4 spaces, so do the same for MERGE. Author: Dean Rasheed Reviewed-by: Nathan Bossart Discussion: https://p

pgsql: doc: Fix indentation of MERGE synopsis.

2025-06-26 Thread Dean Rasheed
doc: Fix indentation of MERGE synopsis. The convention in the documentation for other SQL commands is to indent continuation lines and sub-clauses in the "Synopsis" section by 4 spaces, so do the same for MERGE. Author: Dean Rasheed Reviewed-by: Nathan Bossart Discussion: https://p

pgsql: doc: Fix indentation of MERGE synopsis.

2025-06-26 Thread Dean Rasheed
doc: Fix indentation of MERGE synopsis. The convention in the documentation for other SQL commands is to indent continuation lines and sub-clauses in the "Synopsis" section by 4 spaces, so do the same for MERGE. Author: Dean Rasheed Reviewed-by: Nathan Bossart Discussion: https://p

pgsql: doc: Fix indentation of MERGE synopsis.

2025-06-26 Thread Dean Rasheed
doc: Fix indentation of MERGE synopsis. The convention in the documentation for other SQL commands is to indent continuation lines and sub-clauses in the "Synopsis" section by 4 spaces, so do the same for MERGE. Author: Dean Rasheed Reviewed-by: Nathan Bossart Discussion: https://p

pgsql: Fix MERGE into a plain inheritance parent table.

2025-05-31 Thread Dean Rasheed
to fully initialize rootResultRelInfo if the MERGE has INSERT actions and the target table is a plain inheritance parent. Backpatch to v15, where MERGE was introduced. Reported-by: Andres Freund Author: Dean Rasheed Reviewed-by: Jian He Reviewed-by: Tender Wang Discussion:

pgsql: Fix MERGE into a plain inheritance parent table.

2025-05-31 Thread Dean Rasheed
to fully initialize rootResultRelInfo if the MERGE has INSERT actions and the target table is a plain inheritance parent. Backpatch to v15, where MERGE was introduced. Reported-by: Andres Freund Author: Dean Rasheed Reviewed-by: Jian He Reviewed-by: Tender Wang Discussion:

pgsql: Fix MERGE into a plain inheritance parent table.

2025-05-31 Thread Dean Rasheed
to fully initialize rootResultRelInfo if the MERGE has INSERT actions and the target table is a plain inheritance parent. Backpatch to v15, where MERGE was introduced. Reported-by: Andres Freund Author: Dean Rasheed Reviewed-by: Jian He Reviewed-by: Tender Wang Discussion:

pgsql: Fix MERGE into a plain inheritance parent table.

2025-05-31 Thread Dean Rasheed
to fully initialize rootResultRelInfo if the MERGE has INSERT actions and the target table is a plain inheritance parent. Backpatch to v15, where MERGE was introduced. Reported-by: Andres Freund Author: Dean Rasheed Reviewed-by: Jian He Reviewed-by: Tender Wang Discussion:

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- REL_17_STABLE Details ---

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- REL_16_STABLE Details ---

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- REL_13_STABLE Details ---

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- master Details --- https://git.post

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- REL_14_STABLE Details ---

pgsql: doc: Warn that ts_headline() output is not HTML-safe.

2025-05-01 Thread Dean Rasheed
isely what the default text search parser recognises as valid XML tags, since that's what determines which XML tags ts_headline() will remove. Reported-by: Richard Neill Author: Dean Rasheed Reviewed-by: Noah Misch Backpatch-through: 13 Branch -- REL_15_STABLE Details ---

pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.

2025-03-29 Thread Dean Rasheed
Fix MERGE with DO NOTHING actions into a partitioned table. ExecInitPartitionInfo() duplicates much of the logic in ExecInitMerge(), except that it failed to handle DO NOTHING actions. This would cause an "unknown action in MERGE WHEN clause" error if a MERGE with any DO NOTHING actions attempted

pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.

2025-03-29 Thread Dean Rasheed
Fix MERGE with DO NOTHING actions into a partitioned table. ExecInitPartitionInfo() duplicates much of the logic in ExecInitMerge(), except that it failed to handle DO NOTHING actions. This would cause an "unknown action in MERGE WHEN clause" error if a MERGE with any DO NOTHING actions attempted

pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.

2025-03-29 Thread Dean Rasheed
Fix MERGE with DO NOTHING actions into a partitioned table. ExecInitPartitionInfo() duplicates much of the logic in ExecInitMerge(), except that it failed to handle DO NOTHING actions. This would cause an "unknown action in MERGE WHEN clause" error if a MERGE with any DO NOTHING actions attempted

pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.

2025-03-29 Thread Dean Rasheed
Fix MERGE with DO NOTHING actions into a partitioned table. ExecInitPartitionInfo() duplicates much of the logic in ExecInitMerge(), except that it failed to handle DO NOTHING actions. This would cause an "unknown action in MERGE WHEN clause" error if a MERGE with any DO NOTHING actions attempted

pgsql: Add support for gamma() and lgamma() functions.

2025-03-26 Thread Dean Rasheed
Add support for gamma() and lgamma() functions. These are useful general-purpose math functions which are included in POSIX and C99, and are commonly included in other math libraries, so expose them as SQL-callable functions. Author: Dean Rasheed Reviewed-by: Stepan Neretin Reviewed-by: Peter

pgsql: Allow casting between bytea and integer types.

2025-03-07 Thread Dean Rasheed
)::bytea -> \xfb2e Author: Aleksander Alekseev Reviewed-by: Joel Jacobson Reviewed-by: Yugo Nagata Reviewed-by: Peter Eisentraut Reviewed-by: Michael Paquier Reviewed-by: Dean Rasheed Discussion: https://postgr.es/m/CAJ7c6TPtOp6%2BkFX5QX3fH1SVr7v65uHr-7yEJ%3DGMGQi5uhGtcA%40mail.gmail.

pgsql: Fix parsing of qualified relation names in RETURNING.

2025-01-17 Thread Dean Rasheed
Fix parsing of qualified relation names in RETURNING. Given a qualified refname, refnameNamespaceItem() will search for a matching namespace item by relation OID, rather than by name. Commit 80feb727c8 broke this by adding additional namespace items for OLD and NEW in the RETURNING list, which hav

pgsql: Add OLD/NEW support to RETURNING in DML queries.

2025-01-16 Thread Dean Rasheed
le changes the command type. Therefore, we put no restrictions on the use of old and new in any DML queries. Dean Rasheed, reviewed by Jian He and Jeff Davis. Discussion: https://postgr.es/m/CAEZATCWx0J0-v=Qjc6gXzR=KtsdvAE7Ow=D=mu50agoe+pv...@mail.gmail.com

pgsql: psql: Add option to use expanded mode to all list commands.

2025-01-14 Thread Dean Rasheed
lently "\df+x") will produce a list of functions, with additional details, in expanded mode. This works with all \d* meta-commands, plus \l, \z, and \lo_list, with the one exception that the expanded mode option "x" cannot be appended to "\d" by itself, since "\dx

pgsql: Consistently spell "leakproof" without a hyphen.

2025-01-14 Thread Dean Rasheed
Consistently spell "leakproof" without a hyphen. The overwhelming majority of places already did this, but a small handful of places had a hyphen. Yugo Nagata. Discussion: https://postgr.es/m/CAEZATCXnnuORE2BoGwHw2zbtVvsPOLhbfVmEk9GxRzK%2Bx3OW-Q%40mail.gmail.com Branch -- master Details -

pgsql: psql: Add leakproof indicator to \df+, \do+, \dAo+, and \dC+ out

2025-01-14 Thread Dean Rasheed
security barrier views or tables with row-level security policies. Yugo Nagata, reviewed by Erik Wienhold and Dean Rasheed. Discussion: https://postgr.es/m/20240701220817.483f9b645b95611f8b1f65da%40sranhm.sraoss.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix JsonExpr deparsing to quote variable names in the PASSING cl

2025-01-12 Thread Dean Rasheed
using quote_identifier() in the deparsing code. This oversight was limited to the SQL/JSON query functions JSON_EXISTS(), JSON_QUERY(), and JSON_VALUE(). Back-patch to v17, where these functions were added. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS

pgsql: Fix JsonExpr deparsing to quote variable names in the PASSING cl

2025-01-12 Thread Dean Rasheed
using quote_identifier() in the deparsing code. This oversight was limited to the SQL/JSON query functions JSON_EXISTS(), JSON_QUERY(), and JSON_VALUE(). Back-patch to v17, where these functions were added. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix XMLTABLE() deparsing to quote namespace names if necessary.

2025-01-12 Thread Dean Rasheed
quote_identifier() in the deparsing code. Back-patch to all supported versions. Dean Rasheed, reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCXTpAS%3DncfLNTZ7YS6O5puHeLg_SUYAit%2Bcs7wsrd9Msg%40mail.gmail.com Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix #include order in timestamp.c.

2024-12-02 Thread Dean Rasheed
Fix #include order in timestamp.c. Oversight in 036bdcec9f. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/33152358453cc46f986483e9f82418fb8ba8eaef Modified Files -- src/backend/utils/adt/timestamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add a planner support function for numeric generate_series().

2024-12-02 Thread Dean Rasheed
Add a planner support function for numeric generate_series(). This allows the planner to estimate the number of rows returned by generate_series(numeric, numeric[, numeric]), when the input values can be estimated at plan time. Song Jinzhou, reviewed by Dean Rasheed and David Rowley. Discussion

pgsql: Speed up numeric division by always using the "fast" algorithm.

2024-10-04 Thread Dean Rasheed
quot;exact" is true, and up to 2 or 3 times as fast as the old div_var_fast() function when "exact" is false. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/caezatcvhr10bpdjsanh0u2+sg6ato3md0g+cjkdnrmd-c8h...@mail.gmail.com Branch -- master Details --- h

pgsql: Fix wrong varnullingrels error for MERGE WHEN NOT MATCHED BY SOU

2024-10-03 Thread Dean Rasheed
Fix wrong varnullingrels error for MERGE WHEN NOT MATCHED BY SOURCE. If a MERGE command contains WHEN NOT MATCHED BY SOURCE actions, the source relation appears on the outer side of the join. Thus, any Vars referring to the source in the merge join condition, actions, and RETURNING list should be

pgsql: Fix wrong varnullingrels error for MERGE WHEN NOT MATCHED BY SOU

2024-10-03 Thread Dean Rasheed
Fix wrong varnullingrels error for MERGE WHEN NOT MATCHED BY SOURCE. If a MERGE command contains WHEN NOT MATCHED BY SOURCE actions, the source relation appears on the outer side of the join. Thus, any Vars referring to the source in the merge join condition, actions, and RETURNING list should be

pgsql: Fix incorrect non-strict join recheck in MERGE WHEN NOT MATCHED

2024-10-03 Thread Dean Rasheed
Fix incorrect non-strict join recheck in MERGE WHEN NOT MATCHED BY SOURCE. If a MERGE command contains WHEN NOT MATCHED BY SOURCE actions, the merge join condition is used by the executor to distinguish MATCHED from NOT MATCHED BY SOURCE cases. However, this qual is executed using the output from

pgsql: Fix incorrect non-strict join recheck in MERGE WHEN NOT MATCHED

2024-10-03 Thread Dean Rasheed
Fix incorrect non-strict join recheck in MERGE WHEN NOT MATCHED BY SOURCE. If a MERGE command contains WHEN NOT MATCHED BY SOURCE actions, the merge join condition is used by the executor to distinguish MATCHED from NOT MATCHED BY SOURCE cases. However, this qual is executed using the output from

pgsql: Fix compiler warning in mul_var_short().

2024-08-26 Thread Dean Rasheed
Fix compiler warning in mul_var_short(). Some compilers (e.g., gcc before version 7) mistakenly think "carry" might be used uninitialized. Reported by Tom Lane, per various buildfarm members, e.g. arowana. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7cac6307a43

pgsql: Optimise numeric multiplication using base-NBASE^2 arithmetic.

2024-08-15 Thread Dean Rasheed
be a noticeable slowdown on 32-bit machines. That seems to be an acceptable tradeoff, given the performance gains for other inputs, and the effort that would be required to maintain code specifically targeting 32-bit machines. Joel Jacobson and Dean Rasheed. Discussion: https://postgr.es/m

pgsql: Extend mul_var_short() to 5 and 6-digit inputs.

2024-08-15 Thread Dean Rasheed
a bit using macros and exploiting the fact that some portions of the code are shared between the different cases. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/9d8a4a42-c354-41f3-bbf3-199e1957db97%40app.fastmail.com Branch -- master Details --- https

pgsql: Improve the numeric width_bucket() computation.

2024-07-10 Thread Dean Rasheed
y quotient digits after the decimal point. In addition, it is not necessary to have separate code to handle reversed bounds, since the signs cancel out when dividing. As with b0e9e4d76c and a2a0c7c29e, no back-patch. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/C

pgsql: Optimise numeric multiplication for short inputs.

2024-07-09 Thread Dean Rasheed
larger numbers of digits in the shorter input. Joel Jacobson and Dean Rasheed. Discussion: https://postgr.es/m/44d2ffca-d560-4919-b85a-4d0706094...@app.fastmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ca481d3c9ab7bf69ff0c8d71ad3951d407f6a33c Modified

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: Fix scale clamping in numeric round() and trunc().

2024-07-08 Thread Dean Rasheed
(1000). Back-patch to all supported branches. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/CAEZATCXB%2BrDTuMjhK5ZxcouufigSc-X4tGJCBTMpZ3n%3DxxQuhg%40mail.gmail.com Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commi

pgsql: doc: Mention all options equivalent to pg_dump --filter patterns

2024-06-10 Thread Dean Rasheed
doc: Mention all options equivalent to pg_dump --filter patterns. In the documentation for pg_dump's new --filter option, added by commit a5cf808be5, each object pattern should match some other existing pg_dump option, but some had been omitted, so add them. Noted by Daniel Gustafsson, reviewed b

pgsql: Fix PL/pgSQL's handling of integer ranges containing underscores

2024-06-04 Thread Dean Rasheed
Fix PL/pgSQL's handling of integer ranges containing underscores. Commit faff8f8e47 allowed integer literals to contain underscores, but failed to update the lexer's "numericfail" rule. As a result, a decimal integer literal containing underscores would fail to parse, if used in an integer range w

pgsql: Fix PL/pgSQL's handling of integer ranges containing underscores

2024-06-04 Thread Dean Rasheed
Fix PL/pgSQL's handling of integer ranges containing underscores. Commit faff8f8e47 allowed integer literals to contain underscores, but failed to update the lexer's "numericfail" rule. As a result, a decimal integer literal containing underscores would fail to parse, if used in an integer range w

pgsql: Fix another couple of outdated comments for MERGE RETURNING.

2024-06-04 Thread Dean Rasheed
Fix another couple of outdated comments for MERGE RETURNING. Oversights in c649fa24a4 which added RETURNING support to MERGE. Discussion: https://postgr.es/m/caaphdvpqp6vtuzg-_josueibgyqnrnvxj-vdf+hjlxjhdhz...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/co

pgsql: Use macro NUM_MERGE_MATCH_KINDS instead of '3' in MERGE code.

2024-04-19 Thread Dean Rasheed
Use macro NUM_MERGE_MATCH_KINDS instead of '3' in MERGE code. Code quality improvement for 0294df2f1f84. Aleksander Alekseev, reviewed by Richard Guo. Discussion: https://postgr.es/m/CAJ7c6TMsiaV5urU_Pq6zJ2tXPDwk69-NKVh4AMN5XrRiM7N%2BGA%40mail.gmail.com Branch -- master Details --- ht

pgsql: Add support for MERGE ... WHEN NOT MATCHED BY SOURCE.

2024-03-30 Thread Dean Rasheed
TARGET is equivalent to writing WHEN NOT MATCHED BY TARGET. Dean Rasheed, reviewed by Alvaro Herrera, Ted Yu and Vik Fearing. Discussion: https://postgr.es/m/CAEZATCWqnKGc57Y_JanUBHQXNKcXd7r=0r4nezuvwp+syrk...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Add functions to generate random numbers in a specified range.

2024-03-27 Thread Dean Rasheed
file. The existing random(), random_normal(), and setseed() functions are moved there too, so that they can all share the same PRNG state, which is kept private to that file. Dean Rasheed, reviewed by Jian He, David Zhang, Aleksander Alekseev, and Tomas Vondra. Discussion: https://postgr.es

pgsql: Add "--exclude-extension" to pg_dump's options.

2024-03-20 Thread Dean Rasheed
Add "--exclude-extension" to pg_dump's options. This option (or equivalently specifying "exclude extension pattern" in a filter file) allows extensions matching the specified pattern to be excluded from the dump. Ayush Vatsa, reviewed by Junwang Zhao, Dean Rashe

pgsql: Fix PDF doc generation.

2024-03-17 Thread Dean Rasheed
Fix PDF doc generation. Commit c649fa24a4 broke PDF generation, due to a misplaced id attribute. Per buildfarm member crake. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7eb9a8201890f3b208fd4c109a5b08bf139b692a Modified Files -- doc/src/sgml/func.sg

pgsql: Add RETURNING support to MERGE.

2024-03-17 Thread Dean Rasheed
ror to use it anywhere outside of a MERGE query's RETURNING list. Dean Rasheed, reviewed by Isaac Morland, Vik Fearing, Alvaro Herrera, Gurjeet Singh, Jian He, Jeff Davis, Merlin Moncure, Peter Eisentraut, and Wolfgang Walther. Discussion: http://postgr.es/m/CAEZATCWePEGQR5LBn-vD6SfeLZafzE

pgsql: Fix EXPLAIN output for subplans in MERGE.

2024-03-17 Thread Dean Rasheed
Fix EXPLAIN output for subplans in MERGE. Given a subplan in a MERGE query, EXPLAIN would sometimes fail to properly display expressions involving Params referencing variables in other parts of the plan tree. This would affect subplans outside the topmost join plan node, for which expansion of Pa

pgsql: Fix EXPLAIN output for subplans in MERGE.

2024-03-17 Thread Dean Rasheed
Fix EXPLAIN output for subplans in MERGE. Given a subplan in a MERGE query, EXPLAIN would sometimes fail to properly display expressions involving Params referencing variables in other parts of the plan tree. This would affect subplans outside the topmost join plan node, for which expansion of Pa

  1   2   3   4   >