pgsql: Improve whitespace in without_overlaps test

2025-01-21 Thread Peter Eisentraut
Improve whitespace in without_overlaps test Make some indentation better and more consistent. Extracted from another patch with some actual test changes. Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mdhcy4_qq0+noc...@mail.gmail.com Branch -- mast

pgsql: Fix NO ACTION temporal foreign keys when the referenced endpoint

2025-01-21 Thread Peter Eisentraut
Fix NO ACTION temporal foreign keys when the referenced endpoints change If a referenced UPDATE changes the temporal start/end times, shrinking the span the row is valid, we get a false return from ri_Check_Pk_Match(), but overlapping references may still be valid, if their reference didn't overla

pgsql: Reword recent error messages: "should" -> "must"

2025-01-21 Thread Álvaro Herrera
Reword recent error messages: "should" -> "must" Most were introduced in the 17 timeframe. The ones in wparser_def.c are very old. I also changed "JSON path expression for column \"%s\" should return single item without wrapper" to "JSON path expression for column \"%s\" must return single item

pgsql: Reword recent error messages: "should" -> "must"

2025-01-21 Thread Álvaro Herrera
Reword recent error messages: "should" -> "must" Most were introduced in the 17 timeframe. The ones in wparser_def.c are very old. I also changed "JSON path expression for column \"%s\" should return single item without wrapper" to "JSON path expression for column \"%s\" must return single item

pgsql: Doc: simplify the tutorial's window-function examples.

2025-01-21 Thread Tom Lane
Doc: simplify the tutorial's window-function examples. For the purposes of this discussion, row_number() is just as good as rank(), and its behavior is easier to understand and describe. So let's switch the examples to using row_number(). Along the way to checking the results given in the tutoria

pgsql: Fix detach of a partition that has a toplevel FK to a partitione

2025-01-21 Thread Álvaro Herrera
Fix detach of a partition that has a toplevel FK to a partitioned table In common cases, foreign keys are defined on the toplevel partitioned table; but if instead one is defined on a partition and references a partitioned table, and the referencing partition is detached, we would examine the pg_c

pgsql: Fix detach of a partition that has a toplevel FK to a partitione

2025-01-21 Thread Álvaro Herrera
Fix detach of a partition that has a toplevel FK to a partitioned table In common cases, foreign keys are defined on the toplevel partitioned table; but if instead one is defined on a partition and references a partitioned table, and the referencing partition is detached, we would examine the pg_c

pgsql: Fix detach of a partition that has a toplevel FK to a partitione

2025-01-21 Thread Álvaro Herrera
Fix detach of a partition that has a toplevel FK to a partitioned table In common cases, foreign keys are defined on the toplevel partitioned table; but if instead one is defined on a partition and references a partitioned table, and the referencing partition is detached, we would examine the pg_c

pgsql: Fix detach of a partition that has a toplevel FK to a partitione

2025-01-21 Thread Álvaro Herrera
Fix detach of a partition that has a toplevel FK to a partitioned table In common cases, foreign keys are defined on the toplevel partitioned table; but if instead one is defined on a partition and references a partitioned table, and the referencing partition is detached, we would examine the pg_c

pgsql: Run perltidy

2025-01-21 Thread Michael Paquier
Run perltidy A follow-up patch will adjust the TAP tests to follow a more-structured format for option lists in commands, that perltidy is able to cope better with. Putting the tree first in a clean state makes the next change a bit easier. v20230309 has been used. Author: Dagfinn Ilmari Mannså

pgsql: Improve grammar of options for command arrays in TAP tests

2025-01-21 Thread Michael Paquier
Improve grammar of options for command arrays in TAP tests This commit rewrites a good chunk of the command arrays in TAP tests with a grammar based on the following rules: - Fat commas are used between option names and their values, making it clear to both humans and perltidy that values and name

pgsql: Doc: Update the interaction of tablesync with wal_retrieve_retry

2025-01-21 Thread Amit Kapila
Doc: Update the interaction of tablesync with wal_retrieve_retry_interval. In passing, update the documentation that explains the process of initial data replication to explicitly state that it uses a table synchronization worker. Author: Vignesh C Reviewed-by: Peter Smith, Shlok Kyal, Amit Kapil

pgsql: Additional tests for stored generated columns

2025-01-21 Thread Peter Eisentraut
Additional tests for stored generated columns Some additional tests have been created during the development of virtual generated columns (not included here). This commit adds equivalent tests to the existing test set for stored generated columns. This includes expanded tests related to MERGE, s