PostgreSQL point() Function
The PostgreSQL point()
function constructs a point based on the coordinates specified by the parameters and returns it.
point()
Syntax
This is the syntax of the PostgreSQL point()
function:
point(x double, y double) -> point
Parameters
x
-
Required. The abscissa of a point.
y
-
Required. The ordinate of a point.
Return value
The PostgreSQL point()
function returns a point constructed from the specified coordinates.
point()
Examples
The following statement shows how to construct a point using the PostgreSQL point()
function.
SELECT point(0, 0);
point
-------
(0,0)
Let’s look at another example:
SELECT point(1.25, -2.86);
point
--------------
(1.25,-2.86)