Re: postgresql vs mysql

From: Tim Tassonis <timtas(at)cubic(dot)ch>
To: Chris <dmagick(at)gmail(dot)com>
Cc: Erick Papadakis <erick(dot)papa(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql vs mysql
Date: 2007-02-22 14:22:08
Message-ID: 45DDA710.1040006@cubic.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris wrote:
> 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?
>
> It's not an oddity.
>
> An empty string is a KNOWN value. You know exactly what that value is -
> it's an empty string.
>
> A NULL is UNKNOWN - it doesn't have a value at all.

I do still think it is a bit of an oddity, the concept of the null
column. From my experience, it creates more problems than it actually
solves and generally forces you to code more rather than less in order
to achieve your goals.

But as it is a fundamental, defined part of the sql standard, one just
has to live with it.

Tim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2007-02-22 14:28:59 Re: tsearch2: word position
Previous Message Markus Schiltknecht 2007-02-22 14:18:47 Re: tsearch2: word position