On OpenBSD, only a single version of PostgreSQL is maintained in the Ports tree. With OpenBSD release 6.3, this is PostgreSQL 10.3. The prior release of OpenBSD, 6.2, is the one with PostgreSQL 9.6 in its Ports tree.
- At OpenBSD 6.2-release this was PostgreSQL 9.6.5.
- OpenBSD 6.2-stable has received multiple PostgreSQL updates - the last upgrade was to version 9.6.8.
There is no "downgrade" to older OpenBSD releases. Your choice, if you need PostgreSQL 9.6, is to either re-install the older release, or manually retrofit the 6.2-stable port to OpenBSD 6.3.