Re: point -> double,double ?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: point -> double,double ?
Дата
Msg-id 20030117194044.GB3839@wolff.to
обсуждение исходный текст
Ответ на point -> double,double ?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
On Fri, Jan 17, 2003 at 14:04:21 -0500,
  Greg Stark <gsstark@mit.edu> wrote:
>
> What are the operators or functions to extract the x and y portions of a
> point? I can't find it in my book or in the online \do or \df output anywhere.

One way to do it is the following:
bruno=> select height(box('(0,0)','(1,2)'));
 height
--------
      2
(1 row)

bruno=> select width(box('(0,0)','(1,2)'));
 width
-------
     1
(1 row)

Replace the the non '(0,0)' point with the point of interest.

This only works for nonnegative values.

В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: point -> double,double ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: point -> double,double ?