In Postgres Database, I set a unique of table.
But when I do it in Script, it always return True?
I think it's right to return False not True?
In Postgres Database, I set a unique of table.
But when I do it in Script, it always return True?
I think it's right to return False not True?
Why are you using SF?
The Store and Forward system cannot report the final result from the database, because it doesn't (cannot) wait for that to return. The "True" means the request was successfully queued in the S&F system.
If you need to handle actual database errors, you cannot use S&F.
Consider using an ON CONFLICT
clause in your SQL to pre-emptively handle ID clashes. Then you can use S&F without generating quarantined elements.