Nick Raj writes:
> 1 Datum mpoint_in(PG_FUNCTION_ARGS)
> 2 {
> 3
> 4mpoint *result;
> 5char *pnt=(char *)malloc (sizeof (20));
> 6char *ts=(char *)malloc (sizeof (20));
(1) You should *not* use malloc here. There is seldom any reason to use
malloc directly at all
Hi,
I am defining a new data type called mpoint
i.e.
typedef struct mpoint
{
Point p;
Timestamp t;
} mpoint;
For defining input/output function
1 Datum mpoint_in(PG_FUNCTION_ARGS)
2 {
3
4mpoint *result;
5char *pnt=(char *)malloc (sizeof (20));
6char *ts=(ch