limit field's value with value from another table before write
问题 Are Postgres TRIGGER s transactional by default like (I've read) in MySQL? I've created a TRIGGER procedure that uses a simple IF to limit a column's value with a value from another TABLE with a subsequent UPDATE if the limit is breached. I'd prefer that to be in one single TRANSACTION , but if I wrap the IF ... THEN UPDATE with BEGIN ... COMMIT , it gives error SQL error: ERROR: syntax error at or near ";" LINE 2: BEGIN; ^ Are TRIGGER s TRANSACTION al by default? If not, how can a TRIGGER be