Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 93AEA633306 for ; Sat, 6 Jun 2009 09:07:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35507-02-2 for ; Sat, 6 Jun 2009 09:07:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mail.postgresql.org (Postfix) with ESMTP id 05EFD6405E8 for ; Sat, 6 Jun 2009 09:06:41 -0300 (ADT) Received: from gonzo (ip-118-90-143-186.xdsl.xnet.co.nz [118.90.143.186]) by titania.wxnz.net (Postfix) with ESMTP id 229A310980FC for ; Sun, 7 Jun 2009 00:06:36 +1200 (NZST) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1MCudc-0004dg-G1 for pgsql-sql@postgresql.org; Sun, 07 Jun 2009 00:04:40 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: Type inheritance Date: 6 Jun 2009 12:04:40 GMT Organization: Dis (not Dat) Organisation Lines: 17 Message-ID: References: <5eca56860906050330w6171b327k95881b13c4dca466@mail.gmail.com> <4A294A00.5020802@gmail.com> <5eca56860906060010y4177b88apcf587d62f7286b5d@mail.gmail.com> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1244289880 17611 127.0.0.1 (6 Jun 2009 12:04:40 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/27 X-Sequence-Number: 32632 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. 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.