Annotation Type RequirePostgresVersion


@Target({TYPE,METHOD}) @Retention(RUNTIME) @ExtendWith(PostgresVersionCondition.class) public @interface RequirePostgresVersion
RequirePostgresVersion signals the annotated test class or method that it only should execute if the PostgreSQL server is within a specific range. If the version is outside the range, the annotated test class or method is skipped.

PostgreSQL versions are interpreted as described in the Versioning Policy and structured as "major.minor.patch". Versions can be abbreviated, e.g. "13" is interpreted as "13.0.0".

Using "0.0.0" or the empty string will skip the respective boundary check.

Since:
4.1
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Sets the minimum required version.
    Sets the upper boundary version.
  • Element Details

    • atLeast

      String atLeast
      Sets the minimum required version. This check is inclusive; the database must have at least the version specified.
      Returns:
      The minimum required version. Default is the empty string (ignore the check).
      Default:
      ""
    • lessThan

      String lessThan
      Sets the upper boundary version. The check is exclusive, the database version must be less than this version.
      Returns:
      The maximum allowed version. Default is the empty string (ignore the check).
      Default:
      ""