Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 765EA9FB61C for ; Tue, 6 Mar 2007 15:09:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 54566-10 for ; Tue, 6 Mar 2007 15:09:37 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 2316D9FA2B2 for ; Tue, 6 Mar 2007 15:09:38 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so273993ugf for ; Tue, 06 Mar 2007 11:09:34 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JaXXhdcNBIeKUfioC5gS5wFN1K/h+ViIGKwP79gldcogrVMmtFHPFGbxVSJMsvphy0Njday5DoZbvYSpAsMvzg21BB3DYzp3PUNhMK/dd0smHWWQfKziNjhkv7gE+l3u+hesqGeO+Tsg9udkgWZ/mZ5EER3XWNndDVrfNllaFLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KXe7yGY1KNOZBLsGPI8tvW9/E/lR8ljbJDIFshguy2oXQvxlGMrsoEHUug/a0oZQ4zGkKdrd64baj1a0nMTKLiJqnlMIGKJH5MdpH/678x73T007ekdTrp8s1hrp0dtboiXjEi5ZwyWqVxPMn6mUvWEGts6OZZPL03Ttsr4QMQU= Received: by 10.67.119.13 with SMTP id w13mr2329214ugm.1173208174047; Tue, 06 Mar 2007 11:09:34 -0800 (PST) Received: by 10.67.94.13 with HTTP; Tue, 6 Mar 2007 11:09:33 -0800 (PST) Message-ID: <55c095e90703061109g334af305n5644a7cb10ad4c2@mail.gmail.com> Date: Tue, 6 Mar 2007 16:09:34 -0300 From: "Ezequias Rodrigues da Rocha" To: "Richard Huxton" Subject: Re: Inc Cc: PostgreSQL In-Reply-To: <45EDAE1D.30306@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <55c095e90703060855o228c0d0bm4b021826e3899ba5@mail.gmail.com> <45EDA139.6070103@archonet.com> <55c095e90703060929w745cd560g12426c986b75e430@mail.gmail.com> <45EDAE1D.30306@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/61 X-Sequence-Number: 27699 I did like this: update base.destinationTable set MyCountField = MyCountField + 1 where id = new.keyField_ID; I think it works becouse my tests are ok. My really thank you all. Ezequias 2007/3/6, Richard Huxton : > Ezequias Rodrigues da Rocha wrote: > > Thank you but I must inc an specific row. How to do that ? > > I'm not sure I understand. A row in a different table? > > ... > BEGIN > UPDATE some_table SET counter = counter + 1; > END; > ... > > -- > Richard Huxton > Archonet Ltd >