Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 145949FB744 for ; Tue, 17 Jul 2007 17:48:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26243-10 for ; Tue, 17 Jul 2007 17:48:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 11F4C9FB70B for ; Tue, 17 Jul 2007 17:48:54 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1IAtyU-0007tN-1R for pgsql-sql@postgresql.org; Tue, 17 Jul 2007 16:48:50 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id ABA3B4050; Tue, 17 Jul 2007 16:48:44 -0400 (EDT) Date: Tue, 17 Jul 2007 16:48:44 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: data dependent sequences? Message-ID: <20070717204844.GE22634@phlogiston.dyndns.org> References: <1184515497.5778.141.camel@localhost.localdomain> <20070717150046.GC21688@phlogiston.dyndns.org> <20070717164437.GJ21688@phlogiston.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/105 X-Sequence-Number: 28840 On Tue, Jul 17, 2007 at 12:23:21PM -0600, Stuart wrote: > > Except that the value does matter outside of the database and thus > needs to be remembered. It is not used for ordering at all. If you have two rows of data, where one column is data that varies as a function of the data in some other column, then what you have is data from two different tables, and not one table at all. At least, according to the rules of normalisation I know. My best guess, however, is that you're trying to implement a poor requirement. My bet is that if you dig harder, you'll find out what the requirement _really_ is, and then you won't have to implement what sounds like a bad idea. A -- Andrew Sullivan | ajs@crankycanuck.ca However important originality may be in some fields, restraint and adherence to procedure emerge as the more significant virtues in a great many others. --Alain de Botton