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
psql:sql/support/shifts_houses_rooms_enable_saga.sql:18: ERROR: insert or update on table "rooms" violates foreign key constraint "rooms_house_id_valid"
328
-
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 360 at RAISE
328
+
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 362 at RAISE
329
329
ROLLBACK TO SAVEPOINT s;
330
330
-- it fails on a table with a completely-uncovered foreign key
psql:sql/support/shifts_houses_rooms_enable_saga.sql:18: ERROR: insert or update on table "rooms" violates foreign key constraint "rooms_house_id_valid"
381
-
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 360 at RAISE
381
+
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 362 at RAISE
382
382
ROLLBACK TO SAVEPOINT s;
383
383
-- it fails on a table with a partially-covered foreign key
psql:sql/support/shifts_houses_rooms_enable_saga.sql:18: ERROR: insert or update on table "rooms" violates foreign key constraint "rooms_house_id_valid"
434
-
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 360 at RAISE
434
+
CONTEXT: PL/pgSQL function sql_saga.add_foreign_key(regclass,name[],name,name,sql_saga.fk_match_types,sql_saga.fk_actions,sql_saga.fk_actions,name,name,name,name,name) line 362 at RAISE
Copy file name to clipboardExpand all lines: todo.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ Keep a journal.md that tracks the state of the current ongoing task and relevant
9
9
-[x]**Improve `temporal_merge` parameter validation:** Added server-side checks to `temporal_merge` to provide clear, immediate error messages for invalid parameters, such as `NULL` or non-existent column names, improving developer experience.
10
10
-[x]**Implement `sql_saga.temporal_merge` (Set-Based Upsert API):** Provided a single, high-performance, set-based function for `INSERT`/`UPDATE`/`DELETE` operations on temporal tables. The API is simplified via `regclass` parameters, era introspection, and auto-detection of defaulted columns. This is the official solution for bulk data modifications.
11
11
12
+
-[x]**Fix duplicated column in FK trigger `UPDATE OF` list:** Corrected `add_foreign_key` to prevent adding a synchronized `valid_to`-style column to the trigger's `UPDATE OF` list if it is already part of the era's temporal columns, resolving a "column specified more than once" error. The fix is generic and respects the `synchronize_valid_to_column` era metadata.
13
+
12
14
-[x]**Improve `rename_following` to support column renames:** The event trigger now correctly detects when a column in a foreign key is renamed and automatically updates all relevant metadata, including the foreign key name, column list, and associated trigger names.
13
15
14
16
-[x]**Foreign key validation fails for tables in different schemas:** Fixed. The `fk_update_trigger` is now created with a dynamic column list that includes `valid_to` (if present) to ensure validation fires correctly for synchronized columns without being an overly-broad row-level trigger.
0 commit comments