PostgreSQL box(point) Function
The PostgreSQL box(point)
function converts any point to an empty rectangle.
A rectangle box
is represented by a point in the upper right corner and a point in the lower left corner, for example: (1,1),(0,0)
.
box(point)
Syntax
This is the syntax of the PostgreSQL box(point)
function:
box(point) -> box
Parameters
point
-
Required. A point. For example:
point '(1,1)'
.
Return value
The PostgreSQL box(point)
function returns an empty rectangle. The coordinates of the upper right corner of the rectangle returned by this function are the same as the coordinates of the lower left corner, that is, it is an empty rectangle.
box(point)
Examples
The following statement shows how to use the PostgreSQL box(point)
function to return an empty rectangle.
SELECT box(point '(1,1)');
box
-------------
(1,1),(1,1)