pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jack Flak <jack@flak.nospam.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: restore/dup OIDs HELP!
Date: Mon, 6 Jan 2003 10:42:18 -0800 (PST)
Message-ID: <20030106103627.Q47795-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3iQR9.6166$My.301037750@newssvr14.news.prodigy.com>

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.




view thread (9+ messages)  latest in thread

Message-ID: <20030106103627.Q47795-100000@megazone23.bigpanda.com>
Permalink:  ../20030106103627.Q47795-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030106103627.Q47795-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, jack@flak.nospam.org
  Subject: Re: restore/dup OIDs HELP!
  In-Reply-To: <20030106103627.Q47795-100000@megazone23.bigpanda.com>
  References: <3iQR9.6166$My.301037750@newssvr14.news.prodigy.com> <20030106103627.Q47795-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox