RE: DELETE/DROP on Columns
От | Hiroshi Inoue |
---|---|
Тема | RE: DELETE/DROP on Columns |
Дата | |
Msg-id | 001101bff78b$321f7360$2801007e@tpf.co.jp обсуждение исходный текст |
Ответ на | RE: DELETE/DROP on Columns ("Hiroshi Inoue" <Inoue@tpf.co.jp>) |
Список | 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_attrdefetc ... For backend modules,physical attrbiute number is sufficeint but client programswhich 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.sqlwhich 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 isused 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@tpf.co.jp
В списке pgsql-hackers по дате отправления: