This whole MySQL versus PGSQL thing

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема This whole MySQL versus PGSQL thing
Дата
Msg-id Pine.LNX.4.33.0307151453210.28275-100000@css120.ihs.com
обсуждение исходный текст
Список pgsql-general
OK, so I thought I'd do some more checking.

MySQL is known for just swallowing what you give it and going on without
raising an exception.  numeric is also one of them

SQL script in postgresql:

create table testa (i1 numeric (4,2), i2 numeric(4,2));
insert into testa values (100.23,99.34);
ERROR:  overflow on numeric ABS(value) >= 10^2 for field with precision 4
scale 2


in mysql:

create table testa (i1 numeric (4,2), i2 numeric(4,2));
insert into testa values (100.23,99.34);
Query OK, 1 row affected (0.00 sec)
insert into testa values (10000.23,99.34);
Query OK, 1 row affected (0.00 sec)
insert into testa values (100000.23,99.34);
Query OK, 1 row affected (0.00 sec)

select * from testa;
+--------+-------+
| i1     | i2    |
+--------+-------+
| 100.23 | 99.34 |
| 999.99 | 99.34 |
| 999.99 | 99.34 |
| 999.99 | 99.34 |
+--------+-------+
4 rows in set (0.00 sec)

Hope you weren't basing any accounting systems on this database.
:-)


В списке pgsql-general по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: Firebird vrs Postgresql
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Re: [BUGS] INSTEAD rule bug?