PostgreSQL diameter() Function
The PostgreSQL diameter()
function to extract the diameter of the specified circle.
If you want to get the radius of a circle, use the radius()
function.
diameter()
Syntax
This is the syntax of the PostgreSQL diameter()
function:
diameter(circle) -> double precision
Parameters
circle
-
Required. A circle. For example:
circle '<(0,0),2>'
.
Return value
The PostgreSQL diameter()
function returns the diameter of the specified circle.
diameter()
Examples
The following statement shows how to use the PostgreSQL diameter()
function to return the diameter of the circle circle '<(0,0),2>
.
SELECT diameter(circle '<(0,0),2>');
diameter
----------
4