db: Use the same codepath for cases (2) and (3).
db: Use the same codepath for cases (2) and (3).

Using the second branch _only_ for case (3), of a PostgreSQL server on
a different host, leaves it untested in CI.  It also brings in an
unnecessary Django dependency.

Co-authored-by: Adam Birds <a4b17ee8ffd707e7fe6b66c3737fdd8fbd524cdd@adbwebdesigns.co.uk>

hackerkid/zulip,zulip/zulip,punchagan/zulip,rht/zulip,kou/zulip,kou/zulip,zulip/zulip,eeshangarg/zulip,kou/zulip,zulip/zulip,andersk/zulip,andersk/zulip,hackerkid/zulip,rht/zulip,kou/zulip,rht/zulip,zulip/zulip,punchagan/zulip,zulip/zulip,eeshangarg/zulip,hackerkid/zulip,rht/zulip,hackerkid/zulip,eeshangarg/zulip,kou/zulip,rht/zulip,andersk/zulip,punchagan/zulip,punchagan/zulip,kou/zulip,rht/zulip,eeshangarg/zulip,andersk/zulip,andersk/zulip,zulip/zulip,punchagan/zulip,andersk/zulip,punchagan/zulip,eeshangarg/zulip,eeshangarg/zulip,andersk/zulip,kou/zulip,hackerkid/zulip,punchagan/zulip,hackerkid/zulip,zulip/zulip,eeshangarg/zulip,rht/zulip,hackerkid/zulip