On Fri, Nov 27, 2009 at 06:03:29PM -0000, Greg Sabino Mullane wrote:
> 
> > I'm mostly settled on DBIstcf_STRICT _not_ being the default.
> > So 'loosely typed' will be the default and people who want an error
> > if the type can't be cast safely will need to use StrictlyTyped => 1.
> >                                                                      
> > I'm (slightly) open to persuasion, but that seems to fit the general 
> > philosophy of perl and the DBI better.  It also makes transition easier
> > for anyone who happens to have code that calls bind_column with an SQL type.
> 
> I'd opine that since we're dealing with databases holding Important Things, 
> the default should be to throw an error and make people flip a switch       
> to get lax mode.

Umm, if the database holds Important Things one could opine that perl
should trust the Important Things that are already in the database.
We can argue it either way.

A compromise might be to default to strict (for SQL_INTEGER and
SQL_DOUBLE) but make SQL_NUMERIC immune from strict.

> > o Although my primary impetus for doing this is I need it in DBD::Oracle
> > I would plan to do something similar in DBD::ODBC once this stuff is
> > committed.
> 
> Does anyone know if there are other databases that have mapping issues with
> integers and Perlish integers other than Oracle? Just curious, as I only
> personally know how a handful deal with ints internally.

DBD::SQLite returns only strings, along with most of the pure-perl
drivers, like DBD::CSV.

Which makes me wonder if $sth->_set_fbav(\...@row), which is used by most
pure-perl drivers to store each row, should call sql_type_cast()
automatically.

Tim.

Reply via email to