Re: Typed tables - Mailing list pgsql-hackers

From Andrew Chernow
Subject Re: Typed tables
Date
Msg-id 4B4B83BB.3060307@esilo.com
Whole thread Raw
In response to Re: Typed tables  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Typed tables  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> On tor, 2009-11-05 at 19:24 +0200, Peter Eisentraut wrote:
>> I'm planning to work on typed tables support.  The idea is that you
>> create a table out of a composite type (as opposed to the other way
>> around, which is currently done automatically).
>>
>> CREATE TYPE persons_type AS (name text, bdate date);
>>
>> CREATE TABLE persons OF persons_type;
>>
>> Or the fancy version:
>>
>> CREATE TABLE persons OF persons_type ( PRIMARY KEY (name) );
> 
> And here is the first patch for that.  The feature is complete as far as
> I had wanted it.  I would like to add ALTER TYPE support, but that can
> come as a separate patch.

+1

ISTM that the ultimate would be a 'create table (...._) without storage' 
(or some'm) and make 'create type' an alternate syntax for SQL 
conformance.  For various reasons, we've internally adopted using create 
table for all composites and use a c-like naming convenstion of 
appending _t to such beasts.

I'll just throw a little meat into the pack wolves....constraints....?

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Aidan Van Dyk
Date:
Subject: Re: Add .gitignore files to CVS?
Next
From: Tim Bunce
Date:
Subject: Feature patch 1 for plperl - open issues