PostgreSQL radius() Function

The PostgreSQL radius() function to extract the radius of the specified circle.

If you want to get the radius of a circle, use the diameter() function.

radius() Syntax

This is the syntax of the PostgreSQL radius() function:

radius(circle) -> double precision

Parameters

circle

Required. A circle. For example: circle '<(0,0),2>'.

Return value

The PostgreSQL radius() function returns the radius of the specified circle.

radius() Examples

The following statement shows how to use the PostgreSQL radius() function to return the radius of the circle circle '<(0,0),2>.

SELECT radius(circle '<(0,0),2>');
 radius
--------
      2