! Final Postgres fixes

Includes fixes for things I inadvertantly broke in #1004 as well. This should fix all remaining issues with Postgres.

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>