pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Trouble with composite types
2+ messages / 2 participants
[nested] [flat]

* Trouble with composite types
@ 2004-02-29 20:22 Yasir Malik <ymalik@cs.stevens-tech.edu>
  2004-02-29 23:35 ` Re: Trouble with composite types Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Yasir Malik @ 2004-02-29 20:22 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Trouble with composite types
  2004-02-29 20:22 Trouble with composite types Yasir Malik <ymalik@cs.stevens-tech.edu>
@ 2004-02-29 23:35 ` Joe Conway <mail@joeconway.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joe Conway @ 2004-02-29 23:35 UTC (permalink / raw)
  To: Yasir Malik <ymalik@cs.stevens-tech.edu>; +Cc: pgsql-sql

Yasir Malik wrote:
[attempts to use a composite type as a field data type of another
  composite type]
> 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?

What you are trying to do is currently unsupported. There have been 
multiple discussions in the past on this -- try searching the archives 
for more info.

Joe




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-02-29 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29 20:22 Trouble with composite types Yasir Malik <ymalik@cs.stevens-tech.edu>
2004-02-29 23:35 ` Joe Conway <mail@joeconway.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox