On Wed, Jan 14, 2004 at 08:30:50AM +0100, Henrik Tougaard wrote:
> Jonathan Leffler skrev:
> 
> > H.Merijn Brand wrote:
> >> Tim Bunce wrote:
> >>>> A. What changes you'd like to see in the DBI API.
> >> How about a new attribute: AutoTruncate
> >> 
> >> so I can just put "grkaerhgkjehrgkaerhg" in a varcar/char (3) and it
> >> will store "grk"
> > 
> > That happens anyway in DBD::Informix - the DBMS does it.  There is a
> > warning raised, but the operation goes through anyway.  Which DBMS
> > doesn't do that automatically?  Ingres?
> 
> No, Ingres automatically truncates (and gives a warning, which
> DBD::Ingres ignores, as I have nowhere to put it).
> 
> Which triggers me to suggest somewhere to report warnings/messages
> from the DBMS - it can't be $h->errstr, as that is used for (fatal)
> errors.
> How about $h->warning ?

The long term plan is a callback.

The short term plan is for drivers to call set_err() with a 0 for
the err value but a meaningful errstr value (and optionally state).
Applications that want to can then
  warn $h->errstr if defined $h->err;

Tim.

Reply via email to