Re: postgresql vs mysql - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: postgresql vs mysql
Date
Msg-id 909899.75768.qm@web31811.mail.mud.yahoo.com
Whole thread Raw
In response to Re: postgresql vs mysql  ("Erick Papadakis" <erick.papa@gmail.com>)
List pgsql-general
> 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?


Nulls are also useful for data that is imported where there is not always a way to determine
certain field values for a record.

Now suppose in a query you want to return all record that meet your criteria as well as any that
might meet your criteria depending if the null value was actually known.

Select * from table
Where ((field1,field2,field3) = ('farmer','baker','shoemaker')) is unknown;

Now you can get all records that may meet your criteria.

Regards,
Richard Broersma Jr.

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: How can you tell if a function is immutable from psql?
Next
From: Alvaro Herrera
Date:
Subject: Re: Row-Level Access Control via FK to pg_catalog.pg_authid