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$2801007e@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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 = $1.name'
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...

Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

Browse pgsql-hackers by date

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