psql - loop variable of loop over rows must be a record or row variable or list of scalar variables

Solution 1:

Solved it myself, meh. Needed to declare arow record.

do $$
  declare
    arow record;
    foo varchar(50);
  begin
    for arow in
      select a from (values('foo'), ('bar'), ('fooBar')) s(a)
    loop
      foo := arow.a;
      RAISE NOTICE 'Calling cs_create_job(%)', foo;
    end loop;
  end;
$$;