-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I already got bitten by autocommit (badly; I'm keeping quiet here) - I
> already *have* to do a load of analysis and other futzing around with
> every statement.  Besides, I can't stop userrs from using $dbh->do()
> to execute BEGIN WORK, COMMIT WORK or ROLLBACK WORK.  Or from
> preparing and executing them.

Well, it's not quite that bad. You can make a good effort and catch 99%
of it. DBD::Pg does this by checking the string to be executed:

if ($string =~ /^\s*(BEGIN|COMMIT|ROLLBACK|END|ABORT)\b/) {
        die "Please use DBI functions for transaction handling\n";
}

The actual code is in C and a lot uglier than that, but that's the gist
of it. Makes it very hard for the users to get around using the DBI
methods for transaction control. We'd do the same for SAVEPOINT of course.

- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200503102215
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCMQ2UvJuQZxSWSsgRAhtIAJ9bEjoMthhte56DeP5/4MVf/lyxsACg/lk8
A/g9oUYvRFL3B8/yaecbFVo=
=CZji
-----END PGP SIGNATURE-----


Reply via email to