I use pg_connect, and pg_query in a project. But I'm really not sure that is pg_connect using AutoCommit mode or not?
It is important question, because I need to write some block under transaction, and if one of the statements would be ignored by the server, the database would be inconsistent...
Also interesting question that do pg_query a commit after execution?
For example:
pg_query('begin; update table1...; update table2...; commit');
is same as
pg_query('begin;');
pg_query('update table1...;');
pg_query('update table2...;');
pg_query('commit');
and is the
pg_query('begin; update table1...; update table2...; commit');
working in AutoCommit mode, so begin and commit is nevertheless?
Thanks for your help: dd