Iv been looking through the documentation and searching the web for information on how to create a user type for an address. My basic problem is my C skills are a bit rusty and don't know how to create the appropriate address_in, address_out functions. I would have thought this would be quite a common request but can't seem to dig up much info. Say i wanted the following address type:

CREATE TYPE address{
address1 VARCHAR(40),
address2 VARCHAR(40),
address3 VARCHAR(40),
address4 VARCHAR(40),
postcode VARCHAR(7),

any help would be much appreciated. thanks in advance