Trouble with composite types

Поиск
Список
Период
Сортировка
От Yasir Malik
Тема Trouble with composite types
Дата
Msg-id Pine.NEB.4.58.0402291520050.4735@dab.cs.stevens-tech.edu
обсуждение исходный текст
Ответы Re: Trouble with composite types  (Joe Conway <mail@joeconway.com>)
Список pgsql-sql
Hello,
I don't know why this message is not going through!

I have the following types:
create type street_type as
(
street_number   smallint,
street_name     text,
apt_number      smallint
);

create type address_type as
(
street          street_type,
city            text,
state           char(2),
zip_code        char(5)
);

When I enter that into the command prompt, I the following message:
ERROR:  Attribute "street" has composite type street_type

Why is it giving me error message for something I know is true?  Also, how
do I add a member function to a type?
Thanks,
Yasir


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Humble Geek"
Дата:
Сообщение: PLSQL Question regarding multiple inserts
Следующее
От: rixder@o2.pl
Дата:
Сообщение: Re: Field list from table