Received: from mail-b.bcc.ac.uk (mail-b.bcc.ac.uk [144.82.100.22]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA48558 for ; Thu, 3 Jun 1999 09:35:01 -0400 (EDT) (envelope-from stuart@ludwig.ucl.ac.uk) Received: from kestrel.ludwig.ucl.ac.uk by mail-b.bcc.ac.uk with SMTP (XT-PP); Thu, 3 Jun 1999 14:34:37 +0100 Received: from [128.40.242.190] by kestrel.ludwig.ucl.ac.uk (SMI-8.6/SMI-SVR4) id OAA06228; Thu, 3 Jun 1999 14:35:02 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Sender: stuart@kestrel.ludwig.ucl.ac.uk Message-Id: Date: Thu, 3 Jun 1999 14:33:16 +0100 To: pgsql-sql@postgresql.org From: Stuart Rison Subject: [SQL] Geometric, getting x and y co-ordinates from point data type/ Cc: stuart@ludwig.ucl.ac.uk 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 | +-------------------------+--------------------------------------+