select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / GEOMETRIC FUNCTIONS AND OPERATORS

Computes smallest circle enclosing box.

Signatures & examples

circle ( box ) → circle
Computes smallest circle enclosing box.
circle(box '(1,1),(0,0)') → <(0.5,0.5),0.7071067811865476>
circle ( point, double precision ) → circle
Constructs circle from center and radius.
circle(point '(0,0)', 2.0) → <(0,0),2>
circle ( polygon ) → circle
Converts polygon to circle. The circle's center is the mean of the positions of the polygon's points, and the radius is the average distance of the polygon's points from that center.
circle(polygon '((0,0),(1,3),(2,0))') → <(1,1),1.6094757082487299>
Version history 1
  1. PG 12 → 13changed

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source