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] do unneeded outer joins cost?

2009-06-05 Thread Tom Lane
chester c young writes: > for example: > selectt1.* > from t1 > left join t2 on( ); > since t2 is not used in the result nor is it used in determining the result, > is the to left join t2 used? It's not correct that the t2 join is irrelevant to the result. If any row of t1 joins to

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

[SQL] do unneeded outer joins cost?

2009-06-05 Thread chester c young
for example: selectt1.* from t1 left join t2 on( ); since t2 is not used in the result nor is it used in determining the result, is the to left join t2 used? (the question goes as to how much generated sql needs to be cleaned to be efficient) -- Sent via pgsql-sql maili

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