Re: postgresql vs mysql

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql vs mysql
Date: 2007-02-21 19:45:08
Message-ID: 45DCA144.5040105@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/21/07 08:42, Michael Fuhr wrote:
> On Wed, Feb 21, 2007 at 08:54:30AM -0500, Jan de Visser wrote:
>> It gets better: The problem is not just feb 35, it's also that it doesn't warn
>> you that it didn't like the input format:
>
> Actually it did, sort of.
>
>> mysql> insert into test values ('35-Feb-2007');
>> Query OK, 1 row affected, 1 warning (0.07 sec)
> ^^^^^^^^^
> mysql> show warnings;
> +---------+------+-----------------------------------------+
> | Level | Code | Message |
> +---------+------+-----------------------------------------+
> | Warning | 1265 | Data truncated for column 'td' at row 1 |
> +---------+------+-----------------------------------------+
> 1 row in set (0.00 sec)
>
> Not as good as "ERROR: hey bonehead, there ain't no such date" but

But it *inserts the "data"*!!!!!

> at least it's something :-)

Sure, at the interactive command line.

What kind of error code does this return to applications? Can a PHP
or C programmer catch this warning, or does MySQL return a success code?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF3KFES9HxQb37XmcRAlyNAKCiEIAbywwa3jL0q1jlnx+9AfZVIwCg4dOu
cdgyFYs1ECl9Jh7JJ7XLZ9Y=
=ioTM
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-02-21 20:13:46 Re: massive memory allocation until machine crashes
Previous Message Alexander Elgert 2007-02-21 19:35:40 Re: massive memory allocation until machine crashes