scripts for managing postgres sql