pgsql: Avoid splitting errmsg string to span multiple lines

2024-03-21 Thread Amit Langote
Avoid splitting errmsg string to span multiple lines The error message being fixed was added in 6185c9737c. While at it, add an "a" to the sentence. Reported-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240322.095149.895185546948714852.horikyota.ntt%40gmail.com Branch --

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_12_STABLE Details ---

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_13_STABLE Details ---

pgsql: Fix typo in pg_dumpall role comments fix

2024-03-21 Thread Daniel Gustafsson
Fix typo in pg_dumpall role comments fix Some last minute polish of the patch managed to break the SQL query for extracting the role comments due to fat-fingering. Per the buildfarm Xversion tests. Branch -- REL_14_STABLE Details ---

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Fix dumping role comments when using --no-role-passwords

2024-03-21 Thread Daniel Gustafsson
Fix dumping role comments when using --no-role-passwords Commit 9a83d56b38c added support for allowing pg_dumpall to dump roles without including passwords, which accidentally made dumps omit COMMENTs on roles. This fixes it by using pg_authid to get the comment. Backpatch to all supported

pgsql: Add hash support functions and hash opclass for contrib/ltree.

2024-03-21 Thread Tom Lane
Add hash support functions and hash opclass for contrib/ltree. This also enables hash join and hash aggregation on ltree columns. Tommy Pavlicek, reviewed by jian he Discussion: https://postgr.es/m/caehp-w9zeoheap_nknpcvd_o1c3bauvq1gwhrq8ebknris9...@mail.gmail.com Branch -- master

pgsql: Allow table AM tuple_insert() method to return the different slo

2024-03-21 Thread Alexander Korotkov
Allow table AM tuple_insert() method to return the different slot This allows table AM to return a native tuple slot even if VirtualTupleTableSlot is given as an input. Native tuple slots have knowledge about system attributes, which could be accessed in the future. table_multi_insert() method

pgsql: Add TupleTableSlotOps.is_current_xact_tuple() method

2024-03-21 Thread Alexander Korotkov
Add TupleTableSlotOps.is_current_xact_tuple() method This allows us to abstract how/whether table AM uses transaction identifiers. A custom table AM can use a custom slot, which may not store xmin directly, but determine the tuple belonging to the current transaction in the other way.

pgsql: Allow table AM to store complex data structures in rd_amcache

2024-03-21 Thread Alexander Korotkov
Allow table AM to store complex data structures in rd_amcache The new table AM method free_rd_amcache is responsible for freeing all the memory related to rd_amcache and setting free_rd_amcache to NULL. If the new method is not specified, we still assume rd_amcache to be a single chunk of

pgsql: docs: Make claims about the benefits of HOT updates more precise

2024-03-21 Thread Robert Haas
docs: Make claims about the benefits of HOT updates more precise. The old text claims that HOT completely removes old row versions. It was unclear whether it just meant the tuples themselves, or the tuples together with their line pointers. If it meant the former, it was wrong because we can

pgsql: Revise the style of a paragraph in README.md.

2024-03-21 Thread Nathan Bossart
Revise the style of a paragraph in README.md. Presently, one of the lines in README.md has trailing whitespace, which was added by commit 363eb05996 to maintain a line break that was in the non-Markdown version. Instead of changing .gitattributes, let's match this paragraph's style with the

pgsql: Explicitly require password for SCRAM exchange

2024-03-21 Thread Daniel Gustafsson
Explicitly require password for SCRAM exchange This refactors the SASL init flow to set password_needed on the two SCRAM exchanges currently supported. The code already required this but was set up in such a way that all SASL exchanges required using a password, a restriction which may not hold

pgsql: Refactor SASL exchange to return tri-state status

2024-03-21 Thread Daniel Gustafsson
Refactor SASL exchange to return tri-state status The SASL exchange callback returned state in to output variables: done and success. This refactors that logic by introducing a new return variable of type SASLStatus which makes the code easier to read and understand, and prepares for future SASL

pgsql: Temporarily install debugging in partition_prune test

2024-03-21 Thread David Rowley
Temporarily install debugging in partition_prune test The buildfarm animal parula has been sporadically failing in the partition_prune test for the past week or so. It appears like an auto-vacuum or auto-analyze has run on one of the partitions of the "ab" table, causing the plan to change.

pgsql: Add SQL/JSON query functions

2024-03-21 Thread Amit Langote
Add SQL/JSON query functions This introduces the following SQL/JSON functions for querying JSON data using jsonpath expressions: JSON_EXISTS(), which can be used to apply a jsonpath expression to a JSON value to check if it yields any values. JSON_QUERY(), which can be used to to apply a