pgsql: pg_dump test: Make concatenated create_sql commands more readabl

2022-10-31 Thread Peter Eisentraut
pg_dump test: Make concatenated create_sql commands more readable When the pg_dump 002_pg_dump.pl test generates the command to load the schema, it does # Add terminating semicolon $create_sql{$test_db} .= $tests{$test}->{create_sql} . ";"; In some cases, this creates a duplicate semicol

pgsql: Fix ALTER COLLATION "default" REFRESH VERSION.

2022-10-31 Thread Jeff Davis
Fix ALTER COLLATION "default" REFRESH VERSION. Issue a helpful error message rather than an internal error. Discussion: https://postgr.es/m/51fb77507cafd43fc1a2e733c23045873d93ae60.camel%40j-davis.com Reviewed-by: Thomas Munro Branch -- master Details --- https://git.postgresql.org/pg/

pgsql: Enable pg_collation_actual_version() to work on the default coll

2022-10-31 Thread Jeff Davis
Enable pg_collation_actual_version() to work on the default collation. Previously, it would simply return NULL, which was less useful. Discussion: https://postgr.es/m/51fb77507cafd43fc1a2e733c23045873d93ae60.camel%40j-davis.com Reviewed-by: Thomas Munro Branch -- master Details --- htt

pgsql: Add basic regression tests for semi/antijoin recognition.

2022-10-31 Thread Tom Lane
Add basic regression tests for semi/antijoin recognition. Add some simple tests that the planner recognizes all the standard idioms for SEMI and ANTI joins. Failure to optimize in this way won't necessarily cause any visible change in query results, so check the plans. We had no similar coverage