|
|
|
|
|
by sgarland
14 days ago
|
|
You’d probably write a helper function that automatically runs SELECT pg_current_wal_insert_lsn() after a write and returns it. That said, I don’t see the point. If you need to read DB-generated data (like a PK, or timestamp) from a write, use RETURNING so you get it with one call, and pass that to another function if it needs it. If it’s data you wrote, you already have it. So many web apps are slow because they have a million services, and all of them are calling the DB for the same information instead of passing it to each other. |
|