Re: restore/dup OIDs HELP!

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jack Flak <jack(at)flak(dot)nospam(dot)org>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: restore/dup OIDs HELP!
Date: 2003-01-06 18:42:18
Message-ID: 20030106103627.Q47795-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, 5 Jan 2003, Jack Flak wrote:

> Greetings Group,
>
> I'm running 7.1.
>
> Basically, my question is this: how do I delete an exact dup without
> deleting the original?

You can use one of the other hidden fields. ctid will be unique for the
various rows, but I'm not sure of a good way to bulk delete them (tids
don't seem to have comparison operators so the normal ways I can think of
don't work).

If all of the new rows were added by a single transaction (through copy
say) you'd probably be able to delete all the rows added by that
transaction using the xmin column. Find the xmin belonging to those rows
and delete all the rows having that xmin.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-01-06 19:56:54 Re: restore/dup OIDs HELP!
Previous Message David F. Skoll 2003-01-06 17:57:31 Re: restore/dup OIDs HELP!