Array in a Type

Started by Omachonu Ogaliover 20 years ago2 messagesgeneral
Jump to latest
#1Omachonu Ogali
missnglnk@informationwave.net

I've created a type that contains a few types and an array. But when
I try to create an array from that in a table, I get a '"type[]" does
not exist' error. The manual says that the array type is configured
automatically when a type is created, but this doesn't appear to be
the case. Am I missing something?

widget=# \d network_interfaces;
Composite type "public.network_interfaces"
Column | Type
--------------+------------------------
manufacturer | integer
chipset | character varying(128)
ports | integer
speeds | integer[]

widget=# create table box(id int, network network_interfaces[]);
ERROR: type "network_interfaces[]" does not exist

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Omachonu Ogali (#1)
Re: Array in a Type

Omachonu Ogali <missnglnk@informationwave.net> writes:

I've created a type that contains a few types and an array. But when
I try to create an array from that in a table, I get a '"type[]" does
not exist' error. The manual says that the array type is configured
automatically when a type is created, but this doesn't appear to be
the case. Am I missing something?

The manual says

: Arrays of any built-in or user-defined base type can be created.
: (Arrays of composite types or domains are not yet supported, however.)
^^^^^^^^^^^^^^^

Sorry.

regards, tom lane