| From: | "gnari" <gnari(at)simnet(dot)is> |
|---|---|
| To: | "Sally Sally" <dedeb17(at)hotmail(dot)com>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: autocommit and transactions |
| Date: | 2004-12-01 18:57:05 |
| Message-ID: | 001e01c4d7d7$8d213240$0100000a@wp2000 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
From: "Sally Sally" <dedeb17(at)hotmail(dot)com>
> Using perl DBI I recently read that if autocommit is turned on, it does a
> commit after every transaction. I wanted to confirm if this also applies
to
> select statements.
in fact, it wraps every statement that is not aleady in a transaction,
into one.
> When I'm loading data, I need to do a select before inserting a new row
and
> I don't want to commit after the select because it's unnecessary. So I am
> thinking of turning off the autocommit. Any thoughts?
$dbh->begin_work;
<your statements here>
...
$dbh->commit;
gnari
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Maksim Likharev | 2004-12-01 19:06:06 | Get diagnistic (row_count) 7.3 vs. 7.4 changes |
| Previous Message | Scott Frankel | 2004-12-01 18:48:40 | Re: data integrity and inserts |