Composite types (or equivalent)

From: David Chippington <david(at)econostat(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Composite types (or equivalent)
Date: 2002-07-11 12:40:58
Message-ID: 20020711102029.A82163EC4@webserver.econostat.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have been trying to work out how to use composite types.

All I want is to have a table column that contains a "struct" of existing
postgres types. (Or ultimately an array of this type).

As I am using existing types I would have thought this was easy to achieve
and the vague mentions of composite types indicate that this will do the job.
However the documentation is sparse/non-existent.

Postgres will allow me to create a table that uses another table as a column
type but it then seems impossible to insert any data.

Searching the archives I have found a couple of messages from people trying
to do the same thing. One from two years ago had a reply that said composite
types don't work.

Is this true ? If so why can I create a column that accepts another table as
the type ?

If they cannot be used for this purpose what must I do ? Create my own type
in a C library ?

I would appreciate any help on this subject. I'm not being lazy and have read
the documentation extensively but it doesn't actually seem to say what can
and can't be done.

Thanks

D. Chippington


Browse pgsql-general by date

  From Date Subject
Next Message ktt 2002-07-11 12:57:31 Re: Disabling case sensitivity
Previous Message Christoph Dalitz 2002-07-11 12:37:28 Re: inner join between database