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 06:20:00 |
Message-ID: | 45DBE490.6090908@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/20/07 23:59, Adam Rich wrote:
> I'm not apologizing for their past mistakes.. But the issue
> you cite is no longer true:
>
> "As of 5.0.2, the server requires that month and day values
> be legal, and not merely in the range 1 to 12 and 1 to 31,
> respectively."
Only if you set sql modes STRICT_TRANS_TABLES and STRICT_ALL_TABLES
(which *still* allow bogus dates like 2007-02-00!!) or TRADITIONAL.
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
It's (finally) a step in the right direction, but is really only a
"pretty please", since SQL modes are session-time changeable.
>
> mysql> use test
> Database changed
> mysql> create table test ( td DATE );
> Query OK, 0 rows affected (0.01 sec)
> mysql> insert into test values ('35-Feb-2007');
> ERROR 1292 (22007): Incorrect date value: '35-Feb-2007' for column 'td'
> at row 1
> mysql> select version();
> +-----------------+
> | version() |
> +-----------------+
> | 5.0.27-standard |
> +-----------------+
> 1 row in set (0.00 sec)
>
>
>
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Ron Johnson
> Sent: Tuesday, February 20, 2007 11:35 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] postgresql vs mysql
>
>
> On 02/20/07 15:25, gustavo halperin wrote:
>> Hello
>
>> I have a friend that ask me why postgresql is better than mysql.
>> I personally prefer posgresql, but she need to give in her work 3 or 4
>> strong reasons for that. I mean not to much technical reasons. Can you
>> give help me please ?
>
> The only reason I'd need is that MySQL (even InnoDB) lets you
> accidentally insert intrinsically bad data. According to the
> official v5 docs, it's the app programmer's fault if s/he tries to
> insert 35-Feb-2007 into the database. MySQL will purposefully
> convert it to '0000-00-00'.
>
> http://dev.mysql.com/doc/refman/5.0/en/constraint-invalid-data.html
>
- ---------------------------(end of
broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
- ---------------------------(end of
broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF2+SQS9HxQb37XmcRAqh4AJwJz41yaTzIkqcAIr1wi7gK7J1QPACgvl07
fVNXVeoJo4vWhbIeGWM5MWs=
=Px12
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2007-02-21 06:58:02 | Re: Out of memory on vacuum analyze |
Previous Message | Tom Lane | 2007-02-21 06:10:41 | Re: postgresql vs mysql |