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

1999-06-04 Thread selkovjr
> I have no training in C so I've reached this far by trial and error. I > have however discovered that if write a function such as > > /* pants.c >weird of what! */ > #include "postgres.h" > #include "utils/geo_decls.h" > double > pants(Point *pt) > { > return 2.0; > } > > and compil

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

1999-06-04 Thread Stuart Rison
Following my original posting, I did a bit of hunitng in the source and used them to come up with these functions: /* get_x.c a function to return the x coord of a point */ #include "postgres.h" #include "utils/geo_decls.h" double get_x(Point *pt) { if (!PointerIsValid(pt))

Re: [GENERAL] Embedded SQL in 'C' (cursors)

1999-06-04 Thread James Thompson
On Thu, 3 Jun 1999 [EMAIL PROTECTED] wrote: > Does anyone know how to open a cursor for 'C" ..? > If you download the source code for postgresql there are test programs located in the src/interfaces/ecpg/test directory. These files are about the best learning tools I found for ecpg usage. IIR

[GENERAL] Geometric, getting x and y co-ordinates from point datatype

1999-06-04 Thread Stuart Rison
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,get_x(pos),get_y(pos) FROM table; gives id get_x get_y 1 0 5 2 -1 6 3 5.5 9.8 >From