More DROP COLUMN

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема More DROP COLUMN
Дата
Msg-id GNELIHDDFBOCMGBFGEFOAECECDAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: More DROP COLUMN  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: More DROP COLUMN  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
OK,

DROP COLUMN now seems to work perfectly.  All the old test cases that failed
now work fine.

However, I'm not happy with the way dropped columns are renamed.  I want to
give them a name that no-one would ever want to use as a legit column name.
I don't like this behaviour:

test=# create table test (a int4, b int4);
CREATE TABLE
test=# alter table test drop a;
ALTER TABLE
test=# select dropped_1 from test;
ERROR:  Attribute "dropped_1" not found
test=# alter table test add dropped_1 int4;
ERROR:  ALTER TABLE: column name "dropped_1" already exists in table "test"

It's a bit confusing, hey?

What should we do about it?

Maybe I could make ADD COLUMN give this message instead for dropped columns?

ERROR:  ALTER TABLE: column name "dropped_1" is a dropped column in table
"test" ... or something ...

We could name the fields "________dropped_x" sort of thing perhaps????

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: plpgsql and Schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: More DROP COLUMN