pgsql: Add some UUID support functions

2024-03-19 Thread Peter Eisentraut
Add some UUID support functions Add uuid_extract_timestamp() and uuid_extract_version(). Author: Andrey Borodin Reviewed-by: Sergey Prokhorenko, Kirk Wolak, Przemysław Sztoch Reviewed-by: Nikolay Samokhvalov, Jelte Fennema-Nio, Aleksander Alekseev Reviewed-by: Peter Eisentraut, Chris Travers, Luk

pgsql: Use daterange and YMD in without_overlaps tests instead of tsran

2024-03-19 Thread Peter Eisentraut
Use daterange and YMD in without_overlaps tests instead of tsrange. This makes things a lot easier to read, especially when we get to the FOREIGN KEY tests later. Author: Paul A. Jungwirth Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mdhcy4_qq0+noc...

pgsql: Fix misleading comments

2024-03-19 Thread Peter Eisentraut
Fix misleading comments To match code changes in 229fb58d4f. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/49b579f92dc6add10d1f03ba2cea6eab597a2f2f Modified Files -- src/backend/replication/repl_gram.y | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

pgsql: Use half-open interval notation in without_overlaps tests

2024-03-19 Thread Peter Eisentraut
Use half-open interval notation in without_overlaps tests This way, the input literals match the output in any error messages. Author: Paul A. Jungwirth Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mdhcy4_qq0+noc...@mail.gmail.com Branch -- maste

pgsql: pg_upgrade: run all data type checks per connection

2024-03-19 Thread Daniel Gustafsson
pg_upgrade: run all data type checks per connection The checks for data type usage were each connecting to all databases in the cluster and running their query. On clusters which have a lot of databases this can become unnecessarily expensive. This moves the checks to run in a single connection in

pgsql: gen_node_support.pl: Mark location fields as type alias ParseLoc

2024-03-19 Thread Peter Eisentraut
gen_node_support.pl: Mark location fields as type alias ParseLoc Instead of the rather ugly type=int + name ~= location$, we now have a marker type for offset pointers or sizes that are only relevant when a query text is included, which decreases the complexity required in gen_node_support.pl for

pgsql: Postpone reparameterization of paths until create_plan().

2024-03-19 Thread Tom Lane
Postpone reparameterization of paths until create_plan(). When considering nestloop paths for individual partitions within a partitionwise join, if the inner path is parameterized, it is parameterized by the topmost parent of the outer rel, not the corresponding outer rel itself. Therefore, we ne

pgsql: Inline pg_popcount{32,64} into pg_popcount().

2024-03-19 Thread Nathan Bossart
Inline pg_popcount{32,64} into pg_popcount(). On some systems, calls to pg_popcount{32,64} are indirected through a function pointer. This commit converts pg_popcount() to a function pointer on those systems so that we can inline the appropriate pg_popcount{32,64} implementations into each of the

pgsql: Improve EXPLAIN's display of SubPlan nodes and output parameters

2024-03-19 Thread Tom Lane
Improve EXPLAIN's display of SubPlan nodes and output parameters. Historically we've printed SubPlan expression nodes as "(SubPlan N)", which is pretty uninformative. Trying to reproduce the original SQL for the subquery is still as impractical as before, and would be mighty verbose as well. How

pgsql: Support C.UTF-8 locale in the new builtin collation provider.

2024-03-19 Thread Jeff Davis
Support C.UTF-8 locale in the new builtin collation provider. The builtin C.UTF-8 locale has similar semantics to the libc locale of the same name. That is, code point sort order (fast, memcmp-based) combined with Unicode semantics for character operations such as pattern matching, regular express

pgsql: Add tests for domain-related information schema views

2024-03-19 Thread Peter Eisentraut
Add tests for domain-related information schema views Reviewed-by: Aleksander Alekseev Discussion: https://www.postgresql.org/message-id/flat/9ec24d7b-633d-463a-84c6-7acff769c9e8%40eisentraut.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9578393bc513e350e9cb