presto-postgresql/src/main/java/io/prestosql/plugin/postgresql/PostgreSqlClient.java/PostgreSqlClient/timestampWriteFunction
class PostgreSqlClient:    private static LongWriteFunction timestampWriteFunction(ConnectorSession session)
    {
        ZoneId sessionZone = ZoneId.of(session.getTimeZoneKey().getId());
        boolean legacyTimestamp = session.isLegacyTimestamp();
        return (statement, index, value) -> {
            LocalDateTime localDateTime = legacyTimestamp
                    ? fromPrestoLegacyTimestamp(value, sessionZone)
                    : fromPrestoTimestamp(value);
            statement.setObject(index, toPgTimestamp(localDateTime));
        };
    }