At the latest stable release Openbsd v.6.3, postgresql is upgraded on version v.10.
There is some known way to install the previous postgresql version 9.6.x instead of v.10 without downgrade to the previous openbsd stable release?

I didn't find flavours on databases/postgresql port to select specific postgresql version. There is a databases/postgresql-previous port but it seems to be design for pg_upgrade.

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.