> 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
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))
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
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