From: | Rene Pijlman <rpijlman(at)spamcop(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: UPDATE keyword |
Date: | 2001-05-26 08:56:01 |
Message-ID: | 1frugtoiqu2i7r8fp9n0abmjia8mh7i20c@4ax.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
ianh(at)healthdept(dot)co(dot)pierce(dot)wa(dot)us ("Ian Harding") schreef:
>UPDATE mytable SET myfield = myfield WHERE...
>to fire an update trigger, and executing only the code in that
>trigger surrounded by UPDATE(myfield).
So you update a field by not changing its value, to execute a piece of
code that has nothing to do with the field and the value :-)
>Is there an easy way to duplicate this, or should I work around it?
Isn't it easier (and more poratble) to add a dummy field to the table?
Then you can do:
UPDATE mytable
SET dummy = 1 - dummy
WHERE ...
to execute the piece of code that responds to an update of 'dummy'.
Regards,
René Pijlman
From | Date | Subject | |
---|---|---|---|
Next Message | Robert | 2001-05-26 08:57:54 | Re: Re: Sessions with Postgres |
Previous Message | Nils Zonneveld | 2001-05-26 08:23:25 | Re: Simple SQL question, need help. |