Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 73DD96333F5 for ; Fri, 5 Jun 2009 12:13:13 -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 62820-07 for ; Fri, 5 Jun 2009 12:13:12 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by mail.postgresql.org (Postfix) with ESMTP id BB78163265C for ; Fri, 5 Jun 2009 12:13:11 -0300 (ADT) Received: by fxm9 with SMTP id 9so633658fxm.19 for ; Fri, 05 Jun 2009 08:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Zzkni76x9Mu9Bd+SAVWH0wch0Rk2yst+6RM1V24PD5I=; b=BqUhJdZ/zSviSWhzAAv+wroSyshDosNdcGr9D+17WXasZ9VbVKdsDl67GPMYoQY6eQ iggUbLxEeLc4AU1gTCxvhUm9BDs3BR1HOb1el4qRsWRvnwdn4kay/amr+7sulSmO32rs 74uUEGmTRfTqx+WANUB9VxP2EARUJUMcoGkVg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=AXsZ/9soEVwrEwax/HJjaKmrZIMQYxuV2432xqp3Zdb/smhJQ7tamDrkdzLGvf3Ab2 rtfdHmBt2MYUKSzOMnljq+MbIDz9NpFPZsMdvqS7tmMXGI8TxN98SLaXNMLwjDZk/FPa L31kjV/oO3FCAbn5REoC73Si/rUt2hUeV3rVo= MIME-Version: 1.0 Received: by 10.239.135.16 with SMTP id b16mr287788hbb.145.1244214790363; Fri, 05 Jun 2009 08:13:10 -0700 (PDT) In-Reply-To: <3044.1244209709@sss.pgh.pa.us> References: <5eca56860906050330w6171b327k95881b13c4dca466@mail.gmail.com> <3044.1244209709@sss.pgh.pa.us> Date: Fri, 5 Jun 2009 17:13:10 +0200 Message-ID: <5eca56860906050813s2b77639aoebe73dd18d103891@mail.gmail.com> Subject: Re: Type inheritance From: Gianvito Pio To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=001636457f8e9a9916046b9b54fa 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/23 X-Sequence-Number: 32628 --001636457f8e9a9916046b9b54fa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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? > > regards, tom lane > --001636457f8e9a9916046b9b54fa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 <tgl@sss.pgh.pa.us>
Gianvito Pio <pio.gianvito@gmail.com> writes:
> I just want to ask you if it's possible to define sub types in Pos= tgreSQL
> (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 p= erhaps
domains would do the job?

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane

--001636457f8e9a9916046b9b54fa--