Re: postgresql vs mysql - Mailing list pgsql-general

From Erick Papadakis
Subject Re: postgresql vs mysql
Date
Msg-id e9e8f77d0702211750g598b665o2c29b0c91dbcaf2b@mail.gmail.com
Whole thread Raw
In response to Re: postgresql vs mysql  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: postgresql vs mysql  (Rodrigo Gonzalez <rjgonzale@gmail.com>)
Re: postgresql vs mysql  (Rich Shepard <rshepard@appl-ecosys.com>)
Re: postgresql vs mysql  (Chris <dmagick@gmail.com>)
Re: postgresql vs mysql  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-general
So how should I make a database rule in MySQL to not allow blank
strings. Basically to REQUIRE a value for that column, whether it is
NULL or NADA or VOID or whatever you wish to call it. I just want to
make sure that something, some value, is entered for a column. Would
appreciate any thoughts or pointers.

Does PostgreSQL suffer from this oddity as well? This distinction
between an empty string and a NULL? Could you also please give me an
example of where this would be useful from a business logic
standpoint? Why should a NULL be different from an empty string,
what's the big mysterious difference?

Thanks.



On 2/22/07, Ron Johnson <ron.l.johnson@cox.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/21/07 18:09, Erick Papadakis wrote:
> > How would you like to use a database that has nuances like these --
> > http://forums.mysql.com/read.php?20,141120,141120#msg-141120
>
> Huh?
>
> A blank string (does that mean '' or ' '?) is not NULL, so of
> *course* it should pass the NOT NULL constraint.
>
> Or am I missing something?

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: postgresql vs mysql
Next
From: Rodrigo Gonzalez
Date:
Subject: Re: postgresql vs mysql