arrays of user types.

From: lord(dot)zoltar(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: arrays of user types.
Date: 2006-10-27 02:23:17
Message-ID: 1161915797.582949.233510@k70g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I'm a bit new to PostgreSQL, and I have a question about user-defined
types.
Is it possible to have an array of user-defined types?

Suppose the type looks like this:
CREATE TYPE part AS
(id int2,
count int2);

Now I want to have a column in a table that is a list of parts:

alter table items
add column part_list part[];

But when I try to execute this statement, I get the error that "part[]"
is not a defined type.
Is it not possible to have an array of user-defined types?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-10-27 02:46:32 Re: pg_dumpall failing from possible corrupted shared memory
Previous Message Merlin Moncure 2006-10-27 02:14:34 Re: database not enforcing unqiue constriant