Re: How to insert values with a new type ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: How to insert values with a new type ?
Date
Msg-id 25093.982598940@sss.pgh.pa.us
Whole thread Raw
In response to How to insert values with a new type ?  (Ines.Klimann@liafa.jussieu.fr)
List pgsql-sql
Ines.Klimann@liafa.jussieu.fr writes:
> complexe * complex_in(float x, float y)
> {
>   complexe *result;

>   result = (complexe *)palloc(sizeof(complexe));       
>   result->x = x;
>   result->y = y;

>   return (result);
> }

A datatype's input routine has to accept a string (char *).
        regards, tom lane


pgsql-sql by date:

Previous
From: Alexaki Sofia
Date:
Subject: COPY and UNICODE encoding
Next
From: Peter Eisentraut
Date:
Subject: Re: Contributing Documentation to PG