Re: one other big mysql->postgresql item

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: one other big mysql->postgresql item
Дата
Msg-id Pine.LNX.4.30.0012111738240.1147-100000@peter.localdomain
обсуждение исходный текст
Ответ на one other big mysql->postgresql item  ("George Johnson" <gjohnson@jdsc.com>)
Список pgsql-general
George Johnson writes:

> Forgot one other biggy:
>
> 0000-00-00 00:00:00
>
> is legal for a default value of '' of a datetime column defined as not null.
>
> create table test (
> funkydate datetime not null;
> );
>
> insert into test values ('');
>
> select * from test where funkydate = '0000-00-00 00:00:00';
>
> all those work, in MySQL, and I'm willing to bet a LOT of users have code reflecting that.

Just because MySQL violates century-old time keeping conventions, SQL, and
common sense that doesn't mean it's right.  If you want to store
'0000-00-00 00:00:00' in your database then you can use the character
types.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


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

Предыдущее
От: "George Johnson"
Дата:
Сообщение: Re: one other big mysql->postgresql item
Следующее
От: Philip Hallstrom
Дата:
Сообщение: Article in "Web Techniques" (Jan-2001)...