You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make native Rust planner the default, PL/pgSQL opt-in
The native planner is 10-13x faster with O(1) scaling at the 1M+ row
benchmark. It now runs by default without any GUC setting.
To fall back to PL/pgSQL:
SET sql_saga.temporal_merge.use_plpgsql_planner = true;
Swaps primary/alternate expected files so native output is the primary
expected result. Removes orphan expected files that didn't match any test.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ERROR: Source table "source_boundary" must have either the range column "valid_range" or the component column "<NULL>".
284
-
CONTEXT: PL/pgSQL function sql_saga.temporal_merge_plan(regclass,regclass,sql_saga.temporal_merge_mode,name,text[],name,name,sql_saga.temporal_merge_delete_mode,jsonb,text[],boolean,boolean) line 294 at RAISE
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 207 at SQL statement
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 192 at PERFORM
301
299
ROLLBACK TO SAVEPOINT expect_error;
302
300
\echo '--- Workaround: Use a view to compute the range from boundary columns ---'
303
301
--- Workaround: Use a view to compute the range from boundary columns ---
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 192 at PERFORM
284
+
CONTEXT: PL/pgSQL function sql_saga.temporal_merge_plan(regclass,regclass,sql_saga.temporal_merge_mode,name,text[],name,name,sql_saga.temporal_merge_delete_mode,jsonb,text[],boolean,boolean) line 294 at RAISE
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 207 at SQL statement
299
301
ROLLBACK TO SAVEPOINT expect_error;
300
302
\echo '--- Workaround: Use a view to compute the range from boundary columns ---'
301
303
--- Workaround: Use a view to compute the range from boundary columns ---
Copy file name to clipboardExpand all lines: expected/067_temporal_merge_parameters.out
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -248,7 +248,7 @@ EXCEPTION WHEN others THEN
248
248
RAISE NOTICE 'Caught expected error for non-existent row_id_column: %', SQLERRM;
249
249
END;
250
250
$$;
251
-
NOTICE: Caught expected error for non-existent row_id_column: row_id_column "non_existent_row_id" does not exist in source table tm_bad_cols_sources
251
+
NOTICE: Caught expected error for non-existent row_id_column: row_id_column "non_existent_row_id" does not exist in source table tm_bad_cols_source
252
252
-- Test with non-existent founding_id_column
253
253
DO $$
254
254
BEGIN
@@ -264,7 +264,7 @@ EXCEPTION WHEN others THEN
264
264
RAISE NOTICE 'Caught expected error for non-existent founding_id_column: %', SQLERRM;
265
265
END;
266
266
$$;
267
-
NOTICE: Caught expected error for non-existent founding_id_column: founding_id_column "non_existent_founding_id" does not exist in source table tm_bad_cols_sources
267
+
NOTICE: Caught expected error for non-existent founding_id_column: founding_id_column "non_existent_founding_id" does not exist in source table tm_bad_cols_source
268
268
ROLLBACK TO SAVEPOINT scenario_10;
269
269
SAVEPOINT scenario_11;
270
270
-- Scenario 11: Test using a non-default row_id_column name.
Copy file name to clipboardExpand all lines: expected/067_temporal_merge_parameters_1.out
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -248,7 +248,7 @@ EXCEPTION WHEN others THEN
248
248
RAISE NOTICE 'Caught expected error for non-existent row_id_column: %', SQLERRM;
249
249
END;
250
250
$$;
251
-
NOTICE: Caught expected error for non-existent row_id_column: row_id_column "non_existent_row_id" does not exist in source table tm_bad_cols_source
251
+
NOTICE: Caught expected error for non-existent row_id_column: row_id_column "non_existent_row_id" does not exist in source table tm_bad_cols_sources
252
252
-- Test with non-existent founding_id_column
253
253
DO $$
254
254
BEGIN
@@ -264,7 +264,7 @@ EXCEPTION WHEN others THEN
264
264
RAISE NOTICE 'Caught expected error for non-existent founding_id_column: %', SQLERRM;
265
265
END;
266
266
$$;
267
-
NOTICE: Caught expected error for non-existent founding_id_column: founding_id_column "non_existent_founding_id" does not exist in source table tm_bad_cols_source
267
+
NOTICE: Caught expected error for non-existent founding_id_column: founding_id_column "non_existent_founding_id" does not exist in source table tm_bad_cols_sources
268
268
ROLLBACK TO SAVEPOINT scenario_10;
269
269
SAVEPOINT scenario_11;
270
270
-- Scenario 11: Test using a non-default row_id_column name.
Copy file name to clipboardExpand all lines: expected/088_temporal_merge_source_columns.out
+47-53Lines changed: 47 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -91,23 +91,21 @@ CALL sql_saga.temporal_merge(
91
91
natural_identity_columns => ARRAY['org_nr_typo']
92
92
);
93
93
ERROR: lookup_column org_nr_typo does not exist in target table repro.units
94
-
CONTEXT: PL/pgSQL function sql_saga.temporal_merge_plan(regclass,regclass,sql_saga.temporal_merge_mode,name,text[],name,name,sql_saga.temporal_merge_delete_mode,jsonb,text[],boolean,boolean) line 493 at RAISE
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 207 at SQL statement
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 192 at PERFORM
ERROR: Source table "source_with_typo" must have a "valid_range", "valid_until", or "<NULL>" column.
124
-
CONTEXT: PL/pgSQL function sql_saga.temporal_merge_plan(regclass,regclass,sql_saga.temporal_merge_mode,name,text[],name,name,sql_saga.temporal_merge_delete_mode,jsonb,text[],boolean,boolean) line 322 at RAISE
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 207 at SQL statement
121
+
ERROR: lookup_column org_nr_typo does not exist in target table repro.units
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 192 at PERFORM
ERROR: Source table "source_with_id" must have a "valid_range", "valid_until", or "<NULL>" column.
154
-
CONTEXT: PL/pgSQL function sql_saga.temporal_merge_plan(regclass,regclass,sql_saga.temporal_merge_mode,name,text[],name,name,sql_saga.temporal_merge_delete_mode,jsonb,text[],boolean,boolean) line 322 at RAISE
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 207 at SQL statement
149
+
ERROR: identity_column id_typo does not exist in target table repro.units
PL/pgSQL function sql_saga.temporal_merge(regclass,regclass,text[],sql_saga.temporal_merge_mode,name,name,name,boolean,text[],sql_saga.temporal_merge_delete_mode,boolean,name,name,name,name,text[],boolean) line 192 at PERFORM
171
165
ROLLBACK TO SAVEPOINT expect_error;
172
166
\echo '--- Scenario 5: Happy path (ID back-filling) ---'
0 commit comments