point data type - Mailing list pgsql-general

From Paul Tomblin
Subject point data type
Date
Msg-id 20010326231523.C10950@allhats.xcski.com
Whole thread Raw
List pgsql-general
Is there a way to extract the coordinates from a point datatype?  I'd like
to do something like
    select x_coord(pnt), y_coord(pnt) from table_with_points;

And if there is a way to extract the points from a polygon that would be
great too.

I looked through the results of \df and \do, and it appears the only
solution is to use the distance between the point and line((0,0),(1,0))
and line((0,0),(0,1)).

--
Paul Tomblin <ptomblin@xcski.com>, not speaking for anybody
"A little rudeness and disrespect can elevate a meaningless interaction into a
battle of wills and add drama to an otherwise dull day."
     - Calvin discovers Usenet

pgsql-general by date:

Previous
From: Stephen Davies
Date:
Subject: Re: records zapped to null
Next
From: "Prasanth Kumar"
Date:
Subject: Re: How to auto create a unique key for each newly added record?