title: pg_prepare: cannot insert multiple commands into a prepared statement
body: <p>I have 2 tables, TableA and TableB. TableB has a fk field pointing to TableA.</p>
  
  <p>I need to use a DELETE statement for TableA, and when a record in it is deleted I need to delete all records in TableB related to that record in TableA. Pretty basic.</p>
  
  <pre><code>begin;
  
  DELETE FROM TableB
  WHERE nu_fornecedor = $1;
  
  DELETE FROM TableA
  WHERE nu_fornecedor = $1;
  
  commit;
  </code></pre>
  
  <p>This string is passed to pg_prepare(), but then I get error
  <code>ERROR:  cannot insert multiple commands into a prepared statement</code></p>
  
  <p>Ok, but I need to run both commands in the same transaction, I cant execute 2 separated statements. I tried to use with without begin-commit and got same error.</p>
  
  <p>Any idea how to do it?</p>