Re: Recommended Protocol: Adding Rows to Table

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Recommended Protocol: Adding Rows to Table
Date: 2011-11-25 20:09:30
Message-ID: alpine.LNX.2.00.1111251207330.15652@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 25 Nov 2011, Scott Mead wrote:

> Why don't you first load the data into a table (no primary key), then use
> SQL to find your dups?
>
> once loaded:
> SELECT <primary_key_column>, count(1) from <table> group by 1 having
> count(1) > 1;
>
> At least then, you'll really know what you're in for. You can either
> script a DELETE or... whatever you want to do, once clean, you can add the
> PK.

Scott,

I'll do this. First I need to find why 2 rows (of 143260) are not in the
table after reading the source file. I have those 2 rows somewhat isolated
as one's in the third quarter of the file and one in the fourth quarter.

Thanks,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alpha Beta 2011-11-25 20:31:57 Re: .dmp files in postgresql
Previous Message Thom Brown 2011-11-25 20:08:37 Re: .dmp files in postgresql