Re: Copy/delete issue

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: Herouth Maoz <herouth(at)unicell(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Copy/delete issue
Date: 2008-12-21 18:28:48
Message-ID: 200812211028.48373.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sunday 21 December 2008 1:49:18 am Herouth Maoz wrote:
> Adrian Klaver wrote:
> > <Snip>
> >
> > Are you sure the problem is not in "$datefield" = "*" . That the script
> > that formats the data file is not correctly adding "*" to the right file.
> > Seems almost like sometimes the second CMD is being run against the table
> > that the first CMD should be run on. In other words it is not doing a
> > complete delete , but a date based one, and you then import duplicate
> > records.
>
> Thanks for your reply. The file containing the tables list is static -
> it doesn't change from one run to the next (unless I edit it personally).
>
> Herouth

Well something is not static :) You mentioned this happens only with one
table. Have you tried running your procedure against that table only? Just
because a DELETE did not error does not mean it succeeded in the way you
wanted. You might want to throw a count() in the mix to see if you are really
clearing out the table the way you want to. Also is the actual data file
static from one run to the next? Would also help to see the schema for the
table involved and maybe a sample of the data, if that is possible.

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Charles Duffy 2008-12-22 00:16:28 Tracking down log segment corruption
Previous Message Dennis Brakhane 2008-12-21 13:28:07 Re: Copy/delete issue