On Tue, Jul 07, 2020 at 03:34:31PM -0700, Wells Oliver wrote: > Vanilla SQL script calls a plpgsql function to delete some number of rows > from three tables: > > SELECT mydelete(r) FROM sometable; select count( mydelete(r) ) from sometable; this will return just one row regardless of how many rows are in sometable. Best regards, depesz