Re: one other big mysql->postgresql item - Mailing list pgsql-general

From George Johnson
Subject Re: one other big mysql->postgresql item
Date
Msg-id 005001c06391$b4ae3f60$0300a8c0@jdsc
Whole thread Raw
In response to one other big mysql->postgresql item  ("George Johnson" <gjohnson@jdsc.com>)
Responses Re: one other big mysql->postgresql item  ("Brett W. McCoy" <bmccoy@chapelperilous.net>)
List 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 by date:

Previous
From: Ned Lilly
Date:
Subject: Great Bridge PostgreSQL products and services
Next
From: Peter Eisentraut
Date:
Subject: Re: one other big mysql->postgresql item