3 ms·
It's fairly trivial to do with a savepoint, but it's definitely not performant, and requires some pretty stupid client-side error-handling. It will also cause
by lobster_johnson 12y ago
It's fairly trivial to do with a savepoint, but it's definitely not performant, and requires some pretty stupid client-side error-handling.
It will also cause your Postgres logs to be littered with benign but misleading error messages (possibly these could be silenced, I never bothered to find out).
So, yes, this is great news.
- spacemanmatt 12y agoMinor nit: it's performant and doesn't pollute logs to implement this on the server side. I've written macros to make gen'ing upsert functions easy, given a certain table pattern. But this definitely cleans that situation up as well as makes it accessible to more casual developers.
- lobster_johnson 12y agoYes, sorry, I was referring to doing it client-side.