Which specific flags for PostgreSQL client applications that correspond to Resolve's GUI?

Seth Goldin

I'm trying to write some bash scripts to automate some workflows for Resolve that pertain to PostgreSQL databases.

In the same way that we can load a bash script for the pg_dump command into launchd on macOS, I'd also like to create some scripts with createdb, reindexdb, and vacuumdb.

Whereas pressing "Backup" in the GUI seems to correspond to pg_dump, it seems like:
  • Creating a database in the GUI corresponds to createdb; and
  • Pressing "Optimize" in the GUI seems to correspond to reindexdb and vacuumdb.
My issue is that I don't know what flags to use. Can any PostgreSQL gurus inform me what flags I should include and omit?

The ultimate goal here is to come up with one simple little program to create a proper database and immediately load "Optimize" and "Backup" scripts right into launchd in one fell swoop.