Re: Typed tables - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: Typed tables
Date
Msg-id 20091106091935.98DA.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Typed tables  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> wrote:

> On tor, 2009-11-05 at 11:41 -0700, James Pye wrote:
> >    "CREATE TABLE employee OF employee_data_type, persons_data_type;"
> 
> Not really, but it does open up interesting possibilities, if we just
> allow composite types to participate in inheritance relationships.
> Think abstract base class.  That's pretty much the idea.  Come to think
> of it, that's how the SQL standard defined inheritance.  Sounds
> interesting.  And might actually be simpler to implement.

Do you want to tightly bind the table with the underlying type?
In other words, do you think "copying column definitions" is not enough?

Like: CREATE TABLE employee (LIKE employee_data_type, LIKE persons_data_type);   or CREATE TABLE employee () INHERITS
(employee_data_type,persons_data_type);
 

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Typed tables
Next
From: Robert Haas
Date:
Subject: Re: Why do OLD and NEW have special internal names?