Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

Your audit log is probably lying to you. Postgres 18 fixes it in one statement.

I've written this more times than I'd like, in four or five languages by now: SELECT balance FROM accounts WHERE id = 1 ; -- application does the arithmetic UPDATE accounts SET balance = $ new WHERE…

  • Traditional audit logging involved multiple statements: read, write, insert
  • PostgreSQL 18 introduced single statement approach using RETURNING clause
  • RETURNING clause retrieves old and new values in one UPDATE operation

More from Sunday 6 September →