count number of rows to be affected before update in trigger
Posted
by tomaszsobczak
on Stack Overflow
See other posts from Stack Overflow
or by tomaszsobczak
Published on 2010-04-01T13:41:26Z
Indexed on
2010/04/01
13:53 UTC
Read the original article
Hit count: 125
postgresql
Hi,
I want to know number of rows that will be affected by UPDATE
query in BEFORE
per statement trigger . Is that possible?
The problem is that i want to allow only queries that will update up to 4 rows. If affected rows count is 5 or more i want to raise error.
I don't want to do this in code because i need this check on db level. Is this at all possible?
Thanks in advance for any clues on that
© Stack Overflow or respective owner