Composite Type : pros and cons - Mailing list pgsql-general

From Leguevaques Alex
Subject Composite Type : pros and cons
Date
Msg-id C44163C0-1EDD-4F6E-BA99-DBD9E4E44DC8@wanadoo.fr
Whole thread Raw
Responses Re: Composite Type : pros and cons  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
Hello,
I'm new to Pg and exploring its advanced functionalities for a project.
I find composite type very interesting, but what are problems/limitations ?
I'd want to create this structure for example: 
Phone
Nom du champ
Type 
Accès
Clef
Commentaire
typ_tel
integer


type téléphone (liste  25)
tel_pre
varchar(5)


Préfixe international téléphone
tel_num
varchar(14)



tel_ext
varchar(5)


Numéro de poste

and other structures for address and timestamp fields (creation and update timestamps.

Is it a good idea ? Are index, constraints possible/easy on subfields ?

Thank you

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Why extract( ... from timestamp ) is not immutable?
Next
From: Chris Angelico
Date:
Subject: Re: Best way to create unique primary keys across schemas?