> > I think it'd be a lot better to expose the script status to psql. > (without having to write "foo; echo status=$?"). >
I agree, and I hacked up a proof of concept, but started another thread at https://www.postgresql.org/message-id/CADkLM=cWao2x2f+UDw15W1JkVFr_bsxfstw=ngea7r9m4j-...@mail.gmail.com so as not to clutter up this one.