Re: Type inheritance

From: "Gianvito Pio" <pio(dot)gianvito(at)gmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Type inheritance
Date: 2009-06-06 14:18:57
Message-ID: 72DF18D5AC5748E3A23E6A9B0FE24358@PCGianvito
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mhm...maybe. I need that thing for just 1 table... Have you seen the Oracle
example? Do you know if I can do a similar thing in PostgreSQL?

----- Original Message -----
From: "Jasen Betts" <jasen(at)xnet(dot)co(dot)nz>
Newsgroups: gmane.comp.db.postgresql.sql
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Saturday, June 06, 2009 2:04 PM
Subject: Re: [SQL] Type inheritance

>
> On 2009-06-06, Gianvito Pio <pio(dot)gianvito(at)gmail(dot)com> wrote:
>> --001485f44bfe3e357c046ba8b3d6
>> Content-Type: text/plain; charset=ISO-8859-1
>> Content-Transfer-Encoding: 7bit
>>
>> Oh that was just an example...Let me make a real example:
>> I have a table "Sensors" (that has to contain different sensor types)
>> with
>> a Value. That value doesn't have to be fixed, but I want to define it in
>> a
>> way that it changes its structure when the sensor type changes. For
>> example, for Temperature sensor I would like to have just a float number,
>> but for the humidity I could need of absolute and relative humidity
>> (2 floats). I'd just like to know if I can say that the VALUE is a
>> composite
>> type...that I have then to specialize in Temp Type and Humidity
>> type...using
>> them in their particular case.
>
> this appears to be EAV in disguise.
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma 2009-06-06 14:30:57 Re: Type inheritance
Previous Message Jasen Betts 2009-06-06 12:04:40 Re: Type inheritance