ISINVALIDREASON()

Documentation

VoltDB Home » Documentation » Using VoltDB

ISINVALIDREASON()

ISINVALIDREASON() — Explains why a GEOGRAPHY polygon is invalid

Synopsis

ISINVALIDREASON( polygon )

Description

The ISINVALIDREASON() function returns a text string explaining if the specified GEOGRAPHY value is valid or not and, if not, why not. The argument to the ISINVALIDREASON() function must be a GEOGRAPHY value describing a polygon. This function is especially useful when validating geospatial data.

Example

The following example uses the ISVALID() and ISINVALIDREASON() functions to report on any invalid polygons in the border column of the country table.

SELECT country_name, ISINVALIDREASON(border) 
  FROM Country WHERE NOT ISVALID(border);