Re-Name Attributes on Inheritance - Mailing list pgsql-hackers

From Clark Evans
Subject Re-Name Attributes on Inheritance
Date
Msg-id 36E5FBA2.A9CBA1BB@manhattanproject.com
Whole thread Raw
In response to Re: [HACKERS] Re: map  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Responses Re: [HACKERS] Re-Name Attributes on Inheritance
List pgsql-hackers
How difficult would it be to allow attribute
names to be aliased when inheriting:

CREATE TABLE base  
( oldtag  TEXT );

CREATE TABLE derived 
( more_attrib INT4 )
INHERITS(base)
--
WITH base.oldtag  AS derived.newtag

So that

SELECT * from derived

newtag | more_attrib
-------+-----------
der#1  | derived value #1


and

SELECT * from base*

oldtag 
------
base #1
der #1

Thoughts?  Is this _that_ bad of an idea.  I think
it would really help to manage aggregation complexity.

I suppose this is a big project hunh?  

Thanks!

Clark Evans


pgsql-hackers by date:

Previous
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] Re: map
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Developers globe