Dean Schulze wrote:
> Here are the duplicate records that violate this constraint:
>
> select county, year, idnumber, count(0) from table1 group by county, year,
> idnumber having (count(0) > 1) order by county, count(0);
>
>
> "county","year","idnumber","count"
> "AD",2009,"A57504",2
> "AD",2009,"A58395",2
> "AD",2009,"A58286",2
> "AD",2009,"A58299",2
> "AD",2009,"",5
What you have here seems to be an empty string, which is not the same as
a NULL value. True NULLs behave as expected.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support