Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 830F69FB25D for ; Wed, 7 Feb 2007 18:50:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 96471-10 for ; Wed, 7 Feb 2007 18:49:40 -0400 (AST) X-Greylist: delayed 00:28:06.498034 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 7A96A9FA217 for ; Wed, 7 Feb 2007 18:49:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from outZ.internet-mail-service.net (outZ.internet-mail-service.net [216.240.47.249]) by svr4.postgresql.org (Postfix) with ESMTP id 1A6AB5AF8D3 for ; Wed, 7 Feb 2007 22:21:34 +0000 (GMT) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Wed, 07 Feb 2007 13:58:58 -0800 Received: from [192.168.1.109] (adsl-71-135-160-185.dsl.pltn13.pacbell.net [71.135.160.185]) by idiom.com (Postfix) with ESMTP id C9647125AD7 for ; Wed, 7 Feb 2007 14:21:26 -0800 (PST) Message-ID: <45CA50E6.6090006@obviously.com> Date: Wed, 07 Feb 2007 14:21:26 -0800 From: Bryce Nesbitt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061107 SUSE/1.0.99-18 SeaMonkey/1.1b MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Seeking quick way to clone a row, but give it a new pk. Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.221 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200702/69 X-Sequence-Number: 27403 I need to create some nearly identical copies of rows in a complicated table. Is there a handy syntax that would let me copy a existing row, but get a new primary key for the copy? I'd then go in an edit the 1 or 2 additional columns that differ. The duplicate would be in the same table as the original. This would save me a bunch of typing. Can it be done? ---- Visit http://www.obviously.com/