From: Sean C. <se...@ch...> - 2002-09-18 08:37:25
|
> Have you tried the following?=20 >=20 > dbh['AutoCommit'] =3D false >=20 > If this was set to false, no commit should be issued automatically! Ehh... yes it does. #<DBI::DatabaseHandle:0x81cf860 @trace_mode=3D2, @handle=3D#<DBI::DBD::Pg::= Database:0x81cf838 @coerce=3D#<DBI::DBD::Pg::PgCoerce:0x81cf52c>, @connecti= on=3D#<PGconn:0x81cf568>, @in_transaction=3Dfalse, @type_map=3D{2205=3D>:as= _str, 1083=3D>:as_str, 27=3D>:as_str, 16=3D>:as_bool, 1562=3D>:as_str, 869= =3D>:as_str, 704=3D>:as_str, 22=3D>:as_str, 0=3D>:as_str, 2206=3D>:as_str, = 1700=3D>:as_str, 28=3D>:as_str, 17=3D>:as_bytea, 600=3D>:as_str, 1266=3D>:a= s_str, 650=3D>:as_str, 23=3D>:as_int, 628=3D>:as_str, 1184=3D>:as_str, 700= =3D>:as_float, 601=3D>:as_str, 29=3D>:as_str, 18=3D>:as_str, 2202=3D>:as_st= r, 24=3D>:as_str, 1790=3D>:as_str, 602=3D>:as_str, 1042=3D>:as_str, 30=3D>:= as_str, 19=3D>:as_str, 701=3D>:as_float, 2203=3D>:as_str, 1114=3D>:as_times= tamp, 25=3D>:as_str, 718=3D>:as_str, 1560=3D>:as_str, 1186=3D>:as_str, 702= =3D>:as_str, 603=3D>:as_str, 20=3D>:as_int, 1043=3D>:as_str, 790=3D>:as_str= , 2204=3D>:as_str, 1082=3D>:as_date, 829=3D>:as_str, 26=3D>:as_str, 1033=3D= >:as_str, 604=3D>:as_str, 703=3D>:as_str, 21=3D>:as_int}, @debug_level=3D0,= @autocommit=3Dfalse, @attr=3D{"AutoCommit"=3D>false}>, @trace_output=3D#<I= O:0x8073218>> And in the error log: 2002-09-18 01:33:54 LOG: query: select getdatabaseencoding() 2002-09-18 01:33:54 LOG: query: SELECT typname, typelem FROM pg_type 2002-09-18 01:33:54 LOG: query: SELECT datname FROM pg_database WHERE datn= ame =3D 'foo' 2002-09-18 01:33:54 LOG: query: BEGIN WORK 2002-09-18 01:33:54 LOG: query: DROP DATABASE foo 2002-09-18 01:33:54 ERROR: DROP DATABASE: may not be called in a transacti= on block 2002-09-18 01:33:54 LOG: statement: DROP DATABASE foo The logic in lib/dbd_pg/Pg.rb around line 459 seems broken to me. Thoughts? -sc --=20 Sean Chittenden |