Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0D308633DC8 for ; Fri, 5 Jun 2009 07:30:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 97974-08 for ; Fri, 5 Jun 2009 07:30:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f211.google.com (mail-bw0-f211.google.com [209.85.218.211]) by mail.postgresql.org (Postfix) with ESMTP id 921C1633D14 for ; Fri, 5 Jun 2009 07:30:10 -0300 (ADT) Received: by bwz7 with SMTP id 7so1396216bwz.19 for ; Fri, 05 Jun 2009 03:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=kN26pD1JobUl9aCNPFzTjmWNj6hq3J37XwF6QdHuw68=; b=qXNz0aD284WGJL6YAtZR92SAmpWs727uPyPX7HFNQmIih4lWyVFaYe1bgLZ7f5miel 0sxjzUcTsGmwOktFv2TZpzHz6TYJobpACpp/o6HEIvlBB/oWLtMfMH6/6z+BYOF8roOg kBQpquJPGSRogtmVWRk13KcIiMZksyQ7NThug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=F3LmaBCD9KfmYAju5WBVAbe5nVMtza1AMjb7u65s9UrCWaos3KMYQz0HU4zp9i5I0g NgAKc2YYJ7VwhVU0cmZcVK68RmuLn5FgwzVo3fMgm4ZslFYvaEY4sg8i2JOCpKJQsMa5 dv2mkBkRn2HitglO7tSj4Gc/gd792Gqi6F6rM= MIME-Version: 1.0 Received: by 10.239.151.147 with SMTP id r19mr263505hbb.70.1244197808367; Fri, 05 Jun 2009 03:30:08 -0700 (PDT) Date: Fri, 5 Jun 2009 12:30:08 +0200 Message-ID: <5eca56860906050330w6171b327k95881b13c4dca466@mail.gmail.com> Subject: Type inheritance From: Gianvito Pio To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=001485f1dcd665e7ff046b976017 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200906/20 X-Sequence-Number: 32625 --001485f1dcd665e7ff046b976017 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --001485f1dcd665e7ff046b976017 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --001485f1dcd665e7ff046b976017--