X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1E861476350 for ; Thu, 24 Apr 2003 11:41:16 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3ACB8476384 for ; Thu, 24 Apr 2003 11:41:15 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3OFfGU6013929; Thu, 24 Apr 2003 11:41:16 -0400 (EDT) To: Jeff Boes Cc: pgsql-admin@postgresql.org Subject: Re: Rename constraint? In-reply-to: <25bfef68697eea9481a313c943621a72@TeraNews> References: <25bfef68697eea9481a313c943621a72@TeraNews> Comments: In-reply-to Jeff Boes message dated "Thu, 24 Apr 2003 15:16:59 +0000" Date: Thu, 24 Apr 2003 11:41:15 -0400 Message-ID: <13928.1051198875@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.3 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/335 X-Sequence-Number: 8490 Jeff Boes writes: > I have tables which were created with unnamed constraints: > How can I identify and rename the "$2" and "$3" constraints? Look in pg_relcheck or pg_constraint, depending on your PG version. I think you should be able to get away with just updating the name column. (Not sure whether existing backend sessions will notice such an update, but at worst starting a fresh session would make it take effect.) regards, tom lane