0

I want to test transaction like

begin;
delete from A;
delete from B where B.A in (select guid from A);
rollback;

and see how many records would be deleted. But in pgadmin I see only

ROLLBACK
Query returned successfully in 906 msec.

What to set to see how many records in both tables would this transaction delete?

4
  • Replace DELETE with SELECT?
    – gronostaj
    May 4, 2020 at 9:43
  • Table B has foreign key from table a. B.A = A.guid. I want to see what will happen in transaction.
    – boucekv
    May 4, 2020 at 10:45
  • Did you ever figure this out?
    – ark
    Feb 9, 2023 at 4:37
  • Long time no see this. The order is wrong deleting from B should be before A and I would just use selects with count(*) nowdays. It is always tricky, because there can be a lot of traffic going on and the result can change every second.
    – boucekv
    Apr 11, 2023 at 9:45

0

You must log in to answer this question.

Browse other questions tagged .