"Charlie Monkton" <charlie(at)hwhc(dot)net> writes:
> Executing the following SQL via the psql -c option (or PQexec does not
> work:
> psql -c "delete from test;insert into test values ( 1 );insert into
> test_ref values ( 1 );"
In 7.4 and before, test's ON DELETE trigger won't be fired until the end
of that command string, so it deletes both the old and new rows in
test_ref. We changed the timing of trigger firing in 8.0, and now that
example works as you expect.
regards, tom lane