Re: How to insert values with a new type ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ines(dot)Klimann(at)liafa(dot)jussieu(dot)fr
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to insert values with a new type ?
Date: 2001-02-19 16:09:00
Message-ID: 25093.982598940@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ines(dot)Klimann(at)liafa(dot)jussieu(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-19 16:18:28 Re: Contributing Documentation to PG
Previous Message Alexaki Sofia 2001-02-19 15:35:17 COPY and UNICODE encoding