renaming columns... danger?
От | Michael Teter |
---|---|
Тема | renaming columns... danger? |
Дата | |
Msg-id | 20001027050141.76502.qmail@web10004.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: renaming columns... danger?
Re: renaming columns... danger? |
Список | pgsql-sql |
hi. I just discovered that doing an alter table ... alter column (to rename a column) does not do a complete rename throughout the database. for example, say you have table a, with columns b and c. b is your primary key. now rename b to new_b. if you do a dump of the schema after you rename, you'll find that you can't reload that schema because at the bottom of the definition of table a you have PRIMARY KEY ("b"). shouldn't rename update any index and key definitions? also, and this may actually the source of the problem, while scanning my full (schema and data) dump, I noticed that the contents of table pga_layout also had the old values of columns that I have renamed. I'm very frightened right now, because I'm rather dependent upon my database right now. I don't like the thought that my database is corrupt at the schema level. michael __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/
В списке pgsql-sql по дате отправления: