renaming columns... danger? - Mailing list pgsql-sql

From Michael Teter
Subject renaming columns... danger?
Date
Msg-id 20001027050141.76502.qmail@web10004.mail.yahoo.com
Whole thread Raw
Responses Re: renaming columns... danger?
Re: renaming columns... danger?
List 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 by date:

Previous
From: "Pitot"
Date:
Subject: Nested Aggregate fonction & gouping attributes
Next
From: Daniel Kalchev
Date:
Subject: except on nulls?