Re: AW: ALTER TABLE DROP COLUMN - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: AW: ALTER TABLE DROP COLUMN
Date
Msg-id 39EAD216.D6171DD7@tm.ee
Whole thread Raw
In response to RE: AW: ALTER TABLE DROP COLUMN  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
Chris wrote:
> 
> Hiroshi Inoue wrote:
> 
> > When I used Oracle,I saw neither option of DROP
> > COLUMN feature. It seems to tell us that the
> > implementation isn't
> > that easy. It may not be a bad choise to give up DROP
> > COLUMN feature forever.
> 
> Because it's not easy we shouldn't do it? I don't think so. The perfect
> solution is lazy updating of tuples but it requires versioning of
> meta-data and that requires a bit of work.

I would prefer the logical/physical numbering + typed tuples
(or is it the same thing ;)

It would give us the additional benefit of being able to move to SQL3-wise 
correct CREATE TABLE UNDER syntax with most constraints (primary/foreign key, 
unique, ...) carried on automatically if we store the (single-)inheritance 
hierarchy in one file.

Others (NOT NULL, CHECK, ...) will need additional check for tuple type.

This does not solve the problem for multiple inheritance, but then we could 
cludge most of it by inheriting all from a single root.

I suspect it would still be easier than doing it the other way (by
constructing 
UNIONs each time, checking several indexes for uniquenass (or creating a new 
index type for indexing several separate relations))

---------------------
Hannu


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: Backup, restore & pg_dump
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: ALTER TABLE DROP COLUMN