Re: [SQL] Type inheritance

2009-06-06 Thread Rob Sargent
On Sat, Jun 6, 2009 at 8:30 AM, Richard Broersma wrote: > On Sat, Jun 6, 2009 at 12:10 AM, Gianvito Pio > wrote: > > > 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 w

Re: [SQL] Type inheritance

2009-06-06 Thread Richard Broersma
On Sat, Jun 6, 2009 at 12:10 AM, Gianvito Pio wrote: > 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

Re: [SQL] Type inheritance

2009-06-06 Thread Gianvito Pio
: Re: [SQL] Type inheritance On 2009-06-06, Gianvito Pio 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

Re: [SQL] Type inheritance

2009-06-06 Thread Jasen Betts
On 2009-06-06, Gianvito Pio 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

Re: [SQL] Type inheritance

2009-06-06 Thread Gianvito Pio
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 Temperatur

Re: [SQL] Type inheritance

2009-06-05 Thread Rob Sargent
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 def

Re: [SQL] Type inheritance

2009-06-05 Thread Gianvito Pio
Domains just allow me to redefine base types, including some restrictions. I just want to define a my own type and then to define some new types that inherit from the first one. I hope it's clear now... 2009/6/5 Tom Lane > Gianvito Pio writes: > > I just want to ask you if it's possible to defi

Re: [SQL] Type inheritance

2009-06-05 Thread Tom Lane
Gianvito Pio writes: > 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. It's fairly unclear what your actual requirements are here, but perhaps domains would do the job?

[SQL] Type inheritance

2009-06-05 Thread Gianvito Pio
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

Re: [SQL] Type Inheritance

2004-11-27 Thread Andrew Thorley
is is what im trying to achieve, although at present, to no avail :( - Original Message - From: "Andrew Thorley" <[EMAIL PROTECTED]> To: "Tom Lane" <[EMAIL PROTECTED]> Subject: Re: [SQL] Type Inheritance Date: Sat, 27 Nov 2004 22:04:55 +0800 > > hi

Re: [SQL] Type Inheritance

2004-11-27 Thread Andrew Thorley
t; <[EMAIL PROTECTED]> To: "Andrew Thorley" <[EMAIL PROTECTED]> Subject: Re: [SQL] Type Inheritance Date: Fri, 26 Nov 2004 13:14:07 -0500 > > "Andrew Thorley" <[EMAIL PROTECTED]> writes: > > Does anyone know how to implement type inheritance in postg

Re: [SQL] Type Inheritance

2004-11-26 Thread Tom Lane
"Andrew Thorley" <[EMAIL PROTECTED]> writes: > Does anyone know how to implement type inheritance in postgresql? in oracle > you just use the word UNDER in ur code i.e: > CREATE TYPE test2_UDT UNDER test1_UDT AS (abc INT); If you had said what this *does*, we might be better able to help. But ta

[SQL] Type Inheritance

2004-11-25 Thread Andrew Thorley
Does anyone know how to implement type inheritance in postgresql? in oracle you just use the word UNDER in ur code i.e: CREATE TYPE test2_UDT UNDER test1_UDT AS (abc INT); any ideas? -- __ Check out the latest SMS services @ http://www.linuxmail.org