Re: postgresql vs mysql

From: Rodrigo Gonzalez <rjgonzale(at)gmail(dot)com>
To: Erick Papadakis <erick(dot)papa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql vs mysql
Date: 2007-02-22 01:59:53
Message-ID: 45DCF919.7070401@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erick Papadakis wrote:
> 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?

Just an example:

middle name = '' mean no middle name
middle name = NULL mean "dB does not know if there is or not middle name"

I hope you understand the difference between empty and null. and for
numbers is other thing....in average for example null is not considered,
other values, yes

>
> Thanks.
>
>
>
> On 2/22/07, Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)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?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2007-02-22 02:06:50 Re: postgresql vs mysql
Previous Message Erick Papadakis 2007-02-22 01:50:20 Re: postgresql vs mysql