Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3be-0003GB-C4 for pgsql-sql@arkaria.postgresql.org; Fri, 20 Sep 2013 16:30:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VN3bd-0001hv-Lo for pgsql-sql@arkaria.postgresql.org; Fri, 20 Sep 2013 16:30:57 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3bc-0001ho-KE for pgsql-sql@postgresql.org; Fri, 20 Sep 2013 16:30:56 +0000 Received: from hub.ringways.co.uk ([88.211.105.30] helo=mail.ringways.co.uk) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3bZ-0006RZ-Hm for pgsql-sql@postgresql.org; Fri, 20 Sep 2013 16:30:56 +0000 Received: from eddie.ringways.co.uk ([10.1.1.115]) by mail.ringways.co.uk with esmtp (Exim 4.69) (envelope-from ) id 1VN3bX-0002st-4D; Fri, 20 Sep 2013 17:30:51 +0100 From: Gary Stainburn Organization: Ringways Garages Ltd To: pgsql-sql@postgresql.org Subject: Re: unique key problem on update Date: Fri, 20 Sep 2013 17:30:50 +0100 User-Agent: KMail/1.9.10 Cc: Thomas Kellerer References: <201309201707.56028.gary.stainburn@ringways.co.uk> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201309201730.50960.gary.stainburn@ringways.co.uk> X-Pg-Spam-Score: -0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On Friday 20 September 2013 17:26:58 Thomas Kellerer wrote: > You need to define the primary key as deferrable: > > create table skills_pages > ( > sp_id serial not null, > sp_sequence integer not null, > sp_title character varying(80), > sp_narative text, > primary key (sp_id) deferrable > ); Cheers. I'll look at that. It's actually the second unique index that's the problem but I'm guessing I can set that index up as deferrable too. Hopefully it'll work for mysql too. -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql