Re: one other big mysql->postgresql item
От | George Johnson |
---|---|
Тема | Re: one other big mysql->postgresql item |
Дата | |
Msg-id | 005001c06391$b4ae3f60$0300a8c0@jdsc обсуждение исходный текст |
Ответ на | one other big mysql->postgresql item ("George Johnson" <gjohnson@jdsc.com>) |
Ответы |
Re: one other big mysql->postgresql item
|
Список | pgsql-general |
Hello All, In my two emails, I'm not trying to justify the horrific SQL coding habits of MySQL users, but presenting some of myriad user questions that might possibly pound the lists if you have an influx of new MySQL-converting users. Does that make sense? <grin> I think one thing one'd have to do is separate oneself from the philosophical/theoretical "bad SQL/good SQL" and think punch-clock. Sorta like Java is built to be a punch-clock language -- production grade, no new 'stuff'. PRACTICALLY speaking, of course :) George Johnson > 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 по дате отправления: