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 D8447D6E72 for ; Sun, 20 Nov 2005 11:28:01 -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 90710-04 for ; Sun, 20 Nov 2005 15:28:05 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-out2.blueyonder.co.uk (smtp-out2.blueyonder.co.uk [195.188.213.5]) by svr1.postgresql.org (Postfix) with ESMTP id B508CD6810 for ; Sun, 20 Nov 2005 11:27:58 -0400 (AST) Received: from Eve ([82.43.185.102]) by smtp-out2.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Sun, 20 Nov 2005 15:28:56 +0000 Reply-To: From: Andy Ballingall To: "'Peter Eisentraut'" Cc: Subject: Re: Is it possible to redirect an update/insert/delete to a different table? Date: Sun, 20 Nov 2005 15:28:10 -0000 Organization: Areyoulocal Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcXtwqnp/gckzGu9T6WyvgK/APYi2wAJAyJg In-Reply-To: <200511201207.01114.peter_e@gmx.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: X-OriginalArrivalTime: 20 Nov 2005 15:28:56.0226 (UTC) FILETIME=[1EF0E820:01C5EDE7] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/168 X-Sequence-Number: 23419 Hello Peter, I'm glad it's possible, but I can't see how from the documentation. Say if I have a table called 'apples' and a table called 'pears'. What would the rule look like that would remap all updates on apples so that they were applied to pears instead? Thanks, Andy ------------------------- Andy Ballingall wrote: > 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. You can write a couple of rules for that. -- Peter Eisentraut http://developer.postgresql.org/~petere/ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date: 20/11/2005