Skip site navigation (1) Skip section navigation (2)

RE: DELETE/DROP on Columns

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: DELETE/DROP on Columns
Date: 2000-07-27 05:26:20
Message-ID: 001101bff78b$321f7360$ (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> -----Original Message-----
> From: Hiroshi Inoue
> > -----Original Message-----
> > From: Thomas Swan
> > 	
> > I know as far as 7.0.x and back you cannot delete/drop columns from a 
> > table.   Is this expected to be in the 7.x series?
> >
> Recently there has been a discussion about this issue.
> Tom proposed a soltution which uses 2(logical/physical)
> attribute numbers. It seems the most reasonable solution
> at present.
> If there's no objection,I would try to implement it according
> to his proposal before 7.1.  

Oops,there remains some problems however.
They seems to be pretty serious.

1)  Which(logical or physical) attribute number should other
     system tables have ?
     e.g. pg_index,pg_relcheck,pg_attrdef etc ...
     For backend modules,physical attrbiute number is sufficeint
     but client programs which handle metadata would need 
     logical attribute numbers. 

2) How do we handle logical/physical tuple format ?
    For example,there's a function in test/tegress/sql/
    create_function_2.sql which takes a table type input
    parameter and returns setof a table type.

    CREATE FUNCTION equipment(hobbies_r)
        RETURNS setof equipment_r
        AS 'select * from equipment_r where hobby = $'
        LANGUAGE 'sql';

    This function returns equipment_r tuples of logical format
    which may be different from the physical format which
    is used to store heap tuples once a column is dropped.
    Should input hobbies_r be of logical format also ?

Any comments & suggestions would be appreciated...

Hiroshi Inoue

In response to

pgsql-hackers by date

Next:From: Thomas LockhartDate: 2000-07-27 05:52:27
Subject: Re: Some questions on user defined types and functions.
Previous:From: Tom LaneDate: 2000-07-27 04:26:07
Subject: Re: Warnings triggered by recent includefile cleanups

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group