BEGIN;
INSERT INTO foo_table(foo_column) VALUES('a'),('b'),('c');
-- SELECT * FROM pg_stat_activity WHERE ...
-- shows records with a flag if they have been added/deleted/updated
END;
Is there a way to view the uncommitted inserts/deletes of a transaction for a given table in PostgreSQL 9.x? This is purely for visual confirmation.
While my initial thought is no (just perform a SQL-Select of the table), certain users wanted to visualize differences within the transaction. I could see how this might be helpful if having a lot of savepoints and transactions. Thus, it was worth asking to the community at large.