Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9A8E9633906 for ; Mon, 13 Apr 2009 18:18:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 31091-05 for ; Mon, 13 Apr 2009 18:18:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mail.postgresql.org (Postfix) with ESMTP id 1B7246329A4 for ; Mon, 13 Apr 2009 18:18:56 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id l9so2148873rvb.43 for ; Mon, 13 Apr 2009 14:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/lk1YxAeNmEtD2fW9VW2SA4+mzvPhL2rfz3B+khwURw=; b=pkp8s7hH460+Q4Jyv6BJW5NsE3jOztWYadRoaEsvUIPA4FpbMpUXl15ufsyiRiFDHZ EU7n76OCX/x5d4dZhcg/VeVowfjpn6JNMu9LTKe8+xa39uj4VIY9bJh5CquVUn6y7WlG Cduo7A5azG/rYDoxpvFPEB9+HgSgt4uEQudYg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Owhp/G7mMsKHGKjP1f6eosLSrOy0lHGhhjsjXK1r9U1g3JpUfSAItucc9S490F2Cdu I+axYJrDzmzzJOMPJMI61SK1IE3tTp4zCh6p7JFbNkRReLhhGlaWVaecm69ZF1cQ4xiO HxiByc1zOvY9Ns4xWEWRxKC+Kwu6scMEdNN6M= MIME-Version: 1.0 Received: by 10.141.69.12 with SMTP id w12mr2902175rvk.276.1239657535725; Mon, 13 Apr 2009 14:18:55 -0700 (PDT) In-Reply-To: References: <49DC1034.1060705@frii.com> <49E37441.6030301@frii.com> Date: Mon, 13 Apr 2009 14:18:55 -0700 Message-ID: <396486430904131418g3898dc5h2472f9efab331489@mail.gmail.com> Subject: Re: changing multiple pk's in one update From: Richard Broersma To: Glenn Maynard Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/63 X-Sequence-Number: 32409 On Mon, Apr 13, 2009 at 2:09 PM, Glenn Maynard wr= ote: > Your PK is a composite of (entry, order)? =A0Won't your foreign keys > elsewhere all break when you shift the order around? If there really are foreign keys, then an update will not be allowed to shift a primary key unless the foreign key is set with ON UPDATE CASCADE then the shifts will be cascaded to all references automatically. --=20 Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug