X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 84910D70A1 for ; Sun, 20 Nov 2005 10:23:28 -0400 (AST) 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 85791-02 for ; Sun, 20 Nov 2005 14:23:31 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by svr1.postgresql.org (Postfix) with ESMTP id 96DFDD79C7 for ; Sun, 20 Nov 2005 10:23:25 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 57so191583wri for ; Sun, 20 Nov 2005 06:23:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GRUY069JSplXlyMnR2Qxksa/lBCw2ajn9k20rkloiDh+RvEOAGksaJCS7xfzY+4FjxUOU0LgK29ZDWEdYnEuOe4EgFAG4U+TcIseJe3nIbCUsCi5NEWg+SUY2c1bO7QT+FESyqnfo96dxAcTvbX7hAmOnPiyjj/Dq9560IiMoTI= Received: by 10.65.186.13 with SMTP id n13mr1821753qbp; Sun, 20 Nov 2005 06:23:30 -0800 (PST) Received: by 10.65.180.2 with HTTP; Sun, 20 Nov 2005 06:23:29 -0800 (PST) Message-ID: Date: Sun, 20 Nov 2005 09:23:29 -0500 From: Jaime Casanova To: andy@areyoulocal.co.uk Subject: Re: Is it possible to redirect an update/insert/delete to a different table? Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.022 required=5 tests=[AWL=0.022] X-Spam-Score: 0.022 X-Spam-Level: X-Archive-Number: 200511/167 X-Sequence-Number: 23418 > I've looked through rules, and as far as I can make out, they are only > useful for explicit actions. I'm looking for something that behaves as > though it simply substitutes the table name for a different table name > before executing the command, no matter what the command looks like. > Make 3 rules (INSERT/UPDATE/DELETE), 4 if you want SELECT as well... -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)