Re: COPY - Ignore Problems - Mailing list pgsql-general

From Ron St-Pierre
Subject Re: COPY - Ignore Problems
Date
Msg-id 3FE88226.5050301@syscor.com
Whole thread Raw
In response to COPY - Ignore Problems  (Ron St-Pierre <rstpierre@syscor.com>)
List pgsql-general
Thanks Dann, Michael and Oliver. I guess that a temporary table is what
I should use. I thought about doing it that way initially but thought
I'd see if perhaps I was missing a better way.
Ron


Ron St-Pierre wrote:

> I wish to insert data into a table from a very large text file (from a
> cron script) using COPY. However if the lName (TEXT), fName(TEXT),
> workDate(DATE) already exist I don't want to insert data and just want
> to move onto the next record. Is there any way I can tell my bash
> script/COPY to ignore the case where the unique constraint exists
> (lName,fName,workDate), and move on to the next record?
>
> ps 7.4, debian stable
> TIA
> Ron
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>



pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: hardware requirements under Redhat
Next
From: "Dan Vande More"
Date:
Subject: Mirrors that don't suck.