Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 731EC9F9835 for ; Fri, 7 Sep 2007 11:38:30 -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 12558-07-3 for ; Fri, 7 Sep 2007 11:38:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by postgresql.org (Postfix) with ESMTP id 7170F9F9BE4 for ; Fri, 7 Sep 2007 11:38:26 -0300 (ADT) Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay01.plus.net with esmtp (Exim) id 1ITeyW-0006kV-7i; Fri, 07 Sep 2007 15:38:24 +0100 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id E4998274057; Fri, 7 Sep 2007 15:38:23 +0100 (BST) Message-ID: <46E1625F.4070701@archonet.com> Date: Fri, 07 Sep 2007 15:38:23 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Aleksandr Vinokurov CC: pgsql-sql@postgresql.org Subject: Re: SERIAL type's sequence is double-called or ? References: <46E154D2.8040203@gmail.com> In-Reply-To: <46E154D2.8040203@gmail.com> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/66 X-Sequence-Number: 29279 Aleksandr Vinokurov wrote: > > Logging will be done with this rule: > > create or replace rule chuwee_rule as on insert to chuwee > do insert into chuwee_log (num, mesg) > values (new.num, new.mesg); Don't do logging with rules, do logging with triggers. See mailing-list archives for details. -- Richard Huxton Archonet Ltd