X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5CFF453AE1 for ; Thu, 21 Apr 2005 01:10:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44975-10 for ; Thu, 21 Apr 2005 04:10:45 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id 8E69653AEA for ; Thu, 21 Apr 2005 01:10:08 -0300 (ADT) Received: by flake.decibel.org (Postfix, from userid 1001) id DA95715520; Wed, 20 Apr 2005 23:09:57 -0500 (CDT) Date: Wed, 20 Apr 2005 23:09:57 -0500 From: "Jim C. Nasby" To: pgsql-admin Subject: Re: cost of empty fields Message-ID: <20050421040957.GZ58835@decibel.org> References: <20050415142206.GA347@nibiru.borg.metux.de> <20050415165802.GT58835@decibel.org> <20050421021902.GA16782@nibiru.borg.metux.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050421021902.GA16782@nibiru.borg.metux.de> X-Operating-System: FreeBSD 4.11-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/294 X-Sequence-Number: 17307 On Thu, Apr 21, 2005 at 04:19:02AM +0200, Enrico Weigelt wrote: > * Jim C. Nasby wrote: > > If you setup rules on the view and just have the application select, > > insert, update, and delete from the view instead of the raw tables you > > won't need to change your application at all. Though you do need to be > > aware that you can't easily enforce uniqueness across multiple tables. > hmm. that doesnt sound stable enough for me. > this table is really critical and there's a lot of money in game > (realtime currency trading ...) Note I didn't say you couldn't do it, I just said it wasn't easy. Easy as in adding a normal unique constraint. In this case, you need to add triggers to the tables to check for uniqueness. It's absolutely stable, it's just not as nice as it could be. -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"