https://scratch.mit.edu/ would be more suitable, maybe ?
Imho the best you can do is bash + psql + pl/pgsql , via heredocs . pql <<EOF <pgsql code. EOF It does require lot’s of care with variables though https://www.depesz.com/2023/05/28/variables-in-psql-how-to-use-them/ But one can get fairly creative.
|