Fix the failing object and retest its callers.
When a PostgreSQL translation fails, Logic Proof gives the model the failed case and the source SQL that defines the expected behavior. You can review the proposed change alongside the test run that accepted or rejected it.
HR repair example
One procedure passes. Its caller starts failing.
- Call under test
- HIRE with four arguments
- Before the change
- Failed
- With the proposed fix
- Passed
- Call under test
- HIRE with a fifth salary argument
- Before the change
- Passed
- With the proposed fix
- Failed
| Call under test | Before the change | With the proposed fix |
|---|---|---|
| HIRE with four arguments | Failed | Passed |
| HIRE with a fifth salary argument | Passed | Failed |
The five-argument version calls the four-argument version before setting the employee’s salary. The proposed fix allowed direct hires and raised an error on that nested call. Logic Proof rejected it.
When the clock explains the difference
A source function that reads the current time can return different answers for the same inputs. When failure analysis traces a mismatch to nondeterministic source behavior or a difference between the test environments, Repair sets the object aside and records the reason.
See how verification compares errors and side effectsStart with the object that failed
Start with a view that returns different rows or a procedure PostgreSQL could not create. If SQL Tran could only translate part of an object, Repair can use the original definition and the partial translation to write its first implementation. If your team’s own scripts omit an object, add its definition to the import.
Give each attempt the evidence from the last
The model sees the source and target definitions, the objects they read or write, and the failure recorded by verification. It proposes a diagnosis and replacement SQL. Before trying the change, Logic Proof checks that it parses and declares the expected object. A later attempt also sees earlier proposals and why they failed.
Follow the change through the database
Logic Proof runs the candidate on the test databases. The repaired object must pass against the source, and every previously passing object affected by the change must still pass. The run identifies which objects it retested and which results it carried forward. A caller that now fails is enough to reject the change.
Choose when the fix becomes the target
The default read-only mode saves an accepted repair as a numbered revision for your team to review and apply. Assisted mode makes that revision the project target. If the attempts run out, the object’s history shows the diagnosis, outcome and model cost for each attempt.
How Logic Proof decides which repairs to keep
How far does a retest follow a change?
It starts with the changed object and follows dependencies through callers and their callers. A trigger can extend that scope through the tables it affects. Where the dependency analysis has gaps, Logic Proof also checks calls by name and includes objects whose dependencies are unknown.
Unaffected objects can carry forward results from the previous run. In the project you can distinguish a test that just ran from a result retained because its code and dependencies stayed the same.
Will every repair rebuild two databases?
A routine rewrite can often be tested on the rows that exposed the original failure. Logic Proof replaces the affected target objects in dependency order and reuses the staged data when it can establish that the environment still matches.
A change to a table, sequence, or trigger involved in loading data can change the starting conditions. In those cases the engine rebuilds and reloads staging before deciding whether the fix works.
What happens to a proposal that cannot be used?
Before a candidate reaches a database, its SQL must parse and declare the expected object. Resubmitting the current SQL or repeating a previously tried proposal also ends that attempt before execution.
If a valid candidate fails in staging, Logic Proof restores the prior revision and gives the next attempt the reason. When the attempt limit is reached, the failure stays open with the proposals and their outcomes available for review.
What does your team need to verify?
Tell us which database you’re moving, how far the PostgreSQL code has come, and which behaviors matter most at cutover.