Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E15FC63380A for ; Thu, 14 Jan 2010 23:30:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 77635-02-6 for ; Fri, 15 Jan 2010 03:29:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 340D3633B16 for ; Thu, 14 Jan 2010 23:28:40 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.50) id 1NVcrT-000801-10 for pgsql-sql@postgresql.org; Fri, 15 Jan 2010 04:28:35 +0100 Received: from s01060015e975d7fb.wp.shawcable.net ([24.77.73.195]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2010 04:28:35 +0100 Received: from spluque by s01060015e975d7fb.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2010 04:28:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Seb Subject: rename primary key Date: Thu, 14 Jan 2010 21:28:23 -0600 Organization: Church of Emacs Lines: 11 Message-ID: <87hbqo11yg.fsf@kolob.sebmags.homelinux.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: s01060015e975d7fb.wp.shawcable.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:UOD3v/4a03taiTvL9tWGTSvMFEU= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.643 tagged_above=-10 required=5 tests=AWL=0.956, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/25 X-Sequence-Number: 33561 Hi, Is it possible to rename a primary key? I learnt that to rename foreign keys one has to drop it and recreate with the new name, or add a new new and drop the old one. What is the approach for primary keys? Thanks. Cheers, -- Seb