Re: one other big mysql->postgresql item

From: "George Johnson" <gjohnson(at)jdsc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: one other big mysql->postgresql item
Date: 2000-12-11 16:45:01
Message-ID: 005001c06391$b4ae3f60$0300a8c0@jdsc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert B. Easter 2000-12-11 16:49:22 Re: function that return multiple fields and rows
Previous Message Peter Eisentraut 2000-12-11 16:42:25 Re: one other big mysql->postgresql item