How to create a type ?

From: Ines Klimann <Ines(dot)Klimann(at)liafa(dot)jussieu(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: How to create a type ?
Date: 2001-02-13 16:20:39
Message-ID: 3A895ED7.B4A06EA1@liafa.jussieu.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I am trying to understand how works CREATE TYPE, but it seems to
be too difficult for me...

Can someone help me ?

I have tried this :
----------------------------------
create function personne_in(text)
returns personne
as 'select $1;'
language 'sql';

create function personne_out(text)
returns text
as 'select $1;'
language 'sql';

create type personne (
internallength = variable,
input = personne_in,
output = personne_out
);
---------------------------------
but it is full of mistakes.

Even a simple example in language 'sql' will help me.

Thanks,
Ines.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-13 17:04:37 Re: COPY isn't working right for me
Previous Message Jeff S. 2001-02-13 15:28:30 COPY isn't working right for me