The PostgreSQL manual is unusually direct about this: When an application receives this error message, it should abort the current transaction and retry the whole transaction from the beginning. "The whole transaction" is doing a lot of work in that sentence, and it is the part that gets dropped...

Source: [Dev.to](https://dev.to/mohamedaboelmagd/40001-is-not-a-query-error-2497)

Sponsored