<?xml version="1.0" encoding="windows-1252"?>
<node id="996270" title="Re: DBI ignoring devide by zero" created="2012-09-28 14:39:46" updated="2012-09-28 14:39:46">
<type id="11">
note</type>
<author id="399498">
erix</author>
<data>
<field name="doctext">
&lt;p&gt;It's the DBMS (the database backend) that calculates (or effects) results of SQL statements, not DBI.

&lt;p&gt;What DBMS are you using, and what does its errorlog say when you do something that it does not allow?

&lt;p&gt;(The sql you use there is not valid (no semi-colons terminating the statements, invalid insert-syntax), perhaps it's simply not executed - do you catch errors / follow the database log? )

&lt;p&gt;( &lt;b&gt; update: &lt;/b&gt; FWIW, postgres (9.3devel) gives the result you expect.  Using commandline client psql:
&lt;c&gt;

echo "
create table t (v int not null);
insert into t values (1) ;
insert into t values (10) ;
insert into t values (12) ;
insert into t values (0) ;
select 10/v from t;
" | psql -a          #  -a =&gt; echo all input from script

-- yields:

create table t (v int not null);
CREATE TABLE
insert into t values (1) ;
INSERT 0 1
insert into t values (10) ;
INSERT 0 1
insert into t values (12) ;
INSERT 0 1
insert into t values (0) ;
INSERT 0 1
select 10/v from t;
ERROR:  division by zero

&lt;/c&gt;

&lt;p&gt;)
</field>
<field name="root_node">
996263</field>
<field name="parent_node">
996263</field>
</data>
</node>
