postgres=# SELECT to_timestamp('2017-02-20 16:00:27.989808+02', 'YYYY-MM-DD HH24:MI:SS.SSSSOF')::timestamp with time zone; ERROR: "TZ"/"tz"/"OF" format patterns are not supported in to_date
I'm not a maintainer. Or any kind of an official "expert". But I'm wondering if the above is really a bug. From reading the documentation on: https://www.postgresql.org/docs/current/static/functions-datetime.html, it seems to me to say that to_timestamp() only takes one parameter, which is a double precision number (not a string). But the following worked well for me: