docs: private void setPGobject(int parameterIndex, PGobject x) throws SQLException {
      String typename = x.getType();
      int oid = connection.getTypeInfo().getPGType(typename);
      if (oid == Oid.UNSPECIFIED) {
        throw new PSQLException(GT.tr("Unknown type {0}.", typename),
            PSQLState.INVALID_PARAMETER_TYPE);
      }
  
      if ((x instanceof PGBinaryObject) && connection.binaryTransferSend(oid)) {
        PGBinaryObject binObj = (PGBinaryObject) x;
        byte[] data = new byte[binObj.lengthInBytes()];
        binObj.toBytes(data, 0);
        bindBytes(parameterIndex, data, oid);
      } else {
        setString(parameterIndex, x.getValue(), oid);
      }
    }