Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EFD8A65029C for ; Tue, 12 Aug 2008 12:10:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18843-04-4 for ; Tue, 12 Aug 2008 12:10:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from houseofdesign.de (www.houseofdesign.de [85.10.203.116]) by postgresql.org (Postfix) with ESMTP id 6EB4A650286 for ; Tue, 12 Aug 2008 12:10:33 -0300 (ADT) Received: from f053208194.adsl.alicedsl.de ([78.53.208.194] helo=[192.168.1.35]) by houseofdesign.de with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1KSvT6-0002vX-Be for pgsql-performance@postgresql.org; Tue, 12 Aug 2008 17:07:34 +0200 Cc: pgsql-performance@postgresql.org Message-Id: <4D558373-E7B0-40EC-95EF-FDFE7046ABA2@houseofdesign.de> From: Moritz Onken In-Reply-To: <20080812110416.8e0d6e1c.wmoran@collaborativefusion.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: Using PK value as a String Date: Tue, 12 Aug 2008 17:10:24 +0200 References: <18986.60888.qm@web25807.mail.ukl.yahoo.com> <48A15ECF.5030203@sime.com> <87od3ywg4n.fsf@oxford.xeocode.com> <0673579A-B049-4619-B6E4-EE427FB0DDBA@globalinn.com> <1343069D-263F-4D99-BF7E-269C8F0E7F1F@houseofdesign.de> <20080812110416.8e0d6e1c.wmoran@collaborativefusion.com> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.581 tagged_above=0 required=5 tests=MISSING_HEADERS=1.581 X-Spam-Level: * X-Archive-Number: 200808/126 X-Sequence-Number: 31007 Am 12.08.2008 um 17:04 schrieb Bill Moran: > In response to Moritz Onken : > >> We chose UUID as PK because there is still some information in an >> integer key. >> You can see if a user has registered before someone else (user1.id < >> user2.id) >> or you can see how many new users registered in a specific period of >> time >> (compare the id of the newest user to the id a week ago). This is >> information >> which is in some cases critical. > > So you're accidentally storing critical information in magic values > instead of storing it explicitly? > > Good luck with that. > How do I store critical information? I was just saying that it easy to get some information out of a primary key which is an incrementing integer. And it makes sense, in some rare cases, to have a PK which is some kind of random like UUIDs where you cannot guess the next value. moritz