From: Stuart Rison <stuart@ludwig.ucl.ac.uk>
To: pgsql-sql@postgresql.org
Cc: stuart@ludwig.ucl.ac.uk
Subject: [SQL] Geometric, getting x and y co-ordinates from point data type/
Date: Thu, 3 Jun 1999 14:33:16 +0100
Message-ID: <v04020a04b37c33bdb616@[128.40.242.190]> (raw)
Hi there,
Suppose you have a table:
id pos
1 (0,5)
2 (-1,6)
3 (5.5,9.8)
Are there functions to get to the individual coords such that
SELECT id,x_coord(pos),y_coord(pos) FROM table;
gives
id x_coord y_coord
1 0 5
2 -1 6
3 5.5 9.8
Stuart.
+-------------------------+--------------------------------------+
| Stuart Rison | Ludwig Institute for Cancer Research |
+-------------------------+ 91 Riding House Street |
| Tel. (0171) 878 4041 | London, W1P 8BT, UNITED KINGDOM. |
| Fax. (0171) 878 4040 | stuart@ludwig.ucl.ac.uk |
+-------------------------+--------------------------------------+
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: stuart@ludwig.ucl.ac.uk
Subject: Re: [SQL] Geometric, getting x and y co-ordinates from point data type/
In-Reply-To: <v04020a04b37c33bdb616@[128.40.242.190]>
References: <v04020a04b37c33bdb616@[128.40.242.190]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox