pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Thorley <andrew.thorley@linuxmail.org>
To: Andrew Thorley <andrew.thorley@linuxmail.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql @ postgresql . org <pgsql-sql@postgresql.org>
Subject: Re: Type Inheritance
Date: Sat, 27 Nov 2004 23:33:30 +0800
Message-ID: <20041127153330.2568F416118@ws5-2.us4.outblaze.com> (raw)

"If you had said what this *does*, we might be better able to help"

basically i have a series of types (or data types), of which one is the root and each of the other types appear under the root as in generalisation/specialisation style, inheriting the above types attributes etc. this is what im trying to achieve, although at present, to no avail :(


----- Original Message -----
From: "Andrew Thorley" <andrew.thorley@linuxmail.org>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Subject: Re: [SQL] Type Inheritance
Date: Sat, 27 Nov 2004 22:04:55 +0800

> 
> hi tom thanks for reply.
> 
> im trying to provide inheritance for data types (domains), not tables. i will look into the syntax associated with domains as data types does not include an inheritance function (or so i think).
> 
> regards andy.
> 
> 
> ----- Original Message -----
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
> To: "Andrew Thorley" <andrew.thorley@linuxmail.org>
> Subject: Re: [SQL] Type Inheritance 
> Date: Fri, 26 Nov 2004 13:14:07 -0500
> 
> > 
> > "Andrew Thorley" <andrew.thorley@linuxmail.org> 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 take a look at CREATE DOMAIN, as well as the INHERITS and LIKE
> > options in CREATE TABLE.  Some part of that might be close to what
> > you are looking for.
> > 
> > 			regards, tom lane
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to choose an index scan if your
> >       joining column's datatypes do not match
> > 
> 
> -- 
> ______________________________________________
> Check out the latest SMS services @ http://www.linuxmail.org 
> This allows you to send and receive SMS through your mailbox.
> 
> 
> Powered by Outblaze
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 

-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze



view thread (13+ messages)  latest in thread

Message-ID: <20041127153330.2568F416118@ws5-2.us4.outblaze.com>
Permalink:  ../20041127153330.2568F416118@ws5-2.us4.outblaze.com/
Also on:    postgresql.org/message-id/20041127153330.2568F416118@ws5-2.us4.outblaze.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andrew.thorley@linuxmail.org, tgl@sss.pgh.pa.us
  Subject: Re: Type Inheritance
  In-Reply-To: <20041127153330.2568F416118@ws5-2.us4.outblaze.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox