def execute
@bindvars.collect! do |var|
if var.is_a? DBI::Binary then
oid = @db.__blob_create(PGconn::INV_WRITE)
@db.__blob_write(oid, var.to_s)
oid
else
var
end
end
internal_prepare
if not @db['AutoCommit'] then
@db.start_transaction unless @db.in_transaction?
end
if @db["pg_native_binding"]
pg_result = @db._exec_prepared(@stmt_name, *@bindvars)
else
pg_result = @db._exec_prepared(@stmt_name)
end
@result = DBI::DBD::Pg::Tuples.new(@db, pg_result)
rescue PGError, RuntimeError => err
raise DBI::ProgrammingError.new(err.message)
end