From: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
To: Richard Huxton <dev@archonet.com>
Cc: PostgreSQL <pgsql-sql@postgresql.org>
Subject: Re: Inc
Date: Tue, 6 Mar 2007 16:09:34 -0300
Message-ID: <55c095e90703061109g334af305n5644a7cb10ad4c2@mail.gmail.com> (raw)
In-Reply-To: <45EDAE1D.30306@archonet.com>
References: <55c095e90703060855o228c0d0bm4b021826e3899ba5@mail.gmail.com>
<45EDA139.6070103@archonet.com>
<55c095e90703060929w745cd560g12426c986b75e430@mail.gmail.com>
<45EDAE1D.30306@archonet.com>
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 <dev@archonet.com>:
> 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ezequias.rocha@gmail.com, dev@archonet.com
Subject: Re: Inc
In-Reply-To: <55c095e90703061109g334af305n5644a7cb10ad4c2@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox