Received: from web10004.mail.yahoo.com (web10004.mail.yahoo.com [216.136.130.40]) by hub.org (8.10.1/8.11.0) with SMTP id e9R51rt39900 for ; Fri, 27 Oct 2000 01:01:56 -0400 (EDT) (envelope-from michael_teter@yahoo.com) Message-ID: <20001027050141.76502.qmail@web10004.mail.yahoo.com> Received: from [207.239.163.250] by web10004.mail.yahoo.com; Thu, 26 Oct 2000 22:01:41 PDT Date: Thu, 26 Oct 2000 22:01:41 -0700 (PDT) From: Michael Teter Subject: renaming columns... danger? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200010/253 X-Sequence-Number: 1920 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/