From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
---|---|
To: | Erick Papadakis <erick(dot)papa(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgresql vs mysql |
Date: | 2007-02-22 02:38:46 |
Message-ID: | 909899.75768.qm@web31811.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-02-22 03:21:37 | Re: Row-Level Access Control via FK to pg_catalog.pg_authid |
Previous Message | Michael Fuhr | 2007-02-22 02:10:57 | Re: How can you tell if a function is immutable from psql? |