More refactoring
Refactoring to reduce stubbing of functions in test
Inline execPostgres()