Re: Type inheritance

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Type inheritance
Date: 2009-06-05 16:38:24
Message-ID: 4A294A00.5020802@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm not sure how Temperature and Humidity are related as types beyond
"extends float". i.e. What tuple definition could alternatively have a
Temp or a Humidity value? (I do understand their physical relationship :) )

Gianvito Pio wrote:
> Hi all,
> I just want to ask you if it's possible to define sub types in
> PostgreSQL (Type inheritance). I found that table inheritance is
> possible...but I'd like to do it on types.
>
> Example:
> define a type Value and two subtypes Temperature and Humidity and then
> define a table that has an attribute of Value type (that can accept
> both specialized types).
>
> Thanks

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gianvito Pio 2009-06-06 07:10:12 Re: Type inheritance
Previous Message Tom Lane 2009-06-05 15:25:37 Re: do unneeded outer joins cost?