Re: Typed tables

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: James Pye <lists(at)jwp(dot)name>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Typed tables
Date: 2009-11-06 00:19:35
Message-ID: 20091106091935.98DA.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-11-06 01:03:25 Re: Why do OLD and NEW have special internal names?
Previous Message Heikki Linnakangas 2009-11-05 23:31:33 Re: Typed tables