Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!!

Поиск
Список
Период
Сортировка
Искать
От
Stuart Rison
Тема
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!!
Дата
Msg-id
v04020a08b37db8070684@[128.40.242.190]
Ответ на
Список
Дерево обсуждения
[GENERAL] Geometric, getting x and y co-ordinates from point datatype Stuart Rison <stuart@ludwig.ucl.ac.uk>
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!! Stuart Rison <stuart@ludwig.ucl.ac.uk>
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!! selkovjr@mcs.anl.gov
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!! Stuart Rison <stuart@ludwig.ucl.ac.uk>
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!! selkovjr@mcs.anl.gov
Re: [GENERAL] Geometric, getting x and y co-ordinates GOING MAD!!!!! Stuart Rison <stuart@ludwig.ucl.ac.uk>
>> HELP!
>> WHAT'S GOING ON!!!
>> Why can't I get to pt->y?
>> Why does function pants behave just like get_x (and get_y)?
>
>If you write your function as double, you can't declare it as float in sql.

I thought something like that might have been the case I did try to declare
the return value as float in my get_ attempts but I didn't get
anywhere with it!

>What you wanted is probably this:
>



I guess the bottom lines is that you can't really 'bluff' your way in 'C'
that easy and that I'll have to actually learn some if I want to get 'C'
functions to work!

This all steemed from me trying to write a standard deviation/variance set
of aggregate function.  This was just because a point seemed -at the time-
like quite a 'cute' way of storing to floats in one base type eliminating
the need for arrays (the two floats being the sum of elements and the sum
of the elements squared stored as the x and y coords of a point
respectively).

This means that if anybody is interested I now have these aggregate
functions working (needs PL/pgSQL as opposed to a solution previously
posted by Jan (Weick) which used Pl/Tcl).

Cheers,

S.



+-------------------------+--------------------------------------+
| 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              |
+-------------------------+--------------------------------------+
В списке pgsql-general по дате отправления
От: selkovjr@mcs.anl.gov
Дата:
От: Teodor Cimpoesu
Дата:
FAQ