ST_MakePoint - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025. If you would like to use Python UDFs, create the UDFs prior to that date. Existing Python UDFs will continue to function as normal. For more information, see the blog post .

ST_MakePoint

ST_MakePoint returns a point geometry whose coordinate values are the input values.

Syntax

ST_MakePoint(x, y)
ST_MakePoint(x, y, z)
ST_MakePoint(x, y, z, m)

Arguments

x

A value of data type DOUBLE PRECISION representing the first coordinate.

y

A value of data type DOUBLE PRECISION representing the second coordinate.

z

A value of data type DOUBLE PRECISION representing the third coordinate.

m

A value of data type DOUBLE PRECISION representing the fourth coordinate.

Return type

GEOMETRY of subtype POINT.

The spatial reference system identifier (SRID) value of the returned geometry is set to 0.

If x, y, z, or m is null, then null is returned.

Examples

The following SQL returns a GEOMETRY type of subtype POINT with the provided coordinates.

SELECT ST_AsText(ST_MakePoint(1,3));
st_astext ----------- POINT(1 3)

The following SQL returns a GEOMETRY type of subtype POINT with the provided coordinates.

SELECT ST_AsEWKT(ST_MakePoint(1, 2, 3));
st_asewkt ---------------- POINT Z (1 2 3)

The following SQL returns a GEOMETRY type of subtype POINT with the provided coordinates.

SELECT ST_AsEWKT(ST_MakePoint(1, 2, 3, 4));
st_asewkt ------------------- POINT ZM (1 2 3 4)