Re: [ADMIN] restore/dup OIDs HELP!

2003-01-20 Thread Jack Flak
Thanks man; Iappreciate the data. Stephan Szabo wrote: > > On Thu, 9 Jan 2003, Jack Flak wrote: > >> Stephan, >> >> That's very interesting! I didn't even know about these other "hidden" >> fields. How many others are there? > > Let's see, I think the set is > ctid, oid, xmin, cmin, xmax, cm

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-10 Thread Stephan Szabo
On Thu, 9 Jan 2003, Jack Flak wrote: > Stephan, > > That's very interesting! I didn't even know about these other "hidden" > fields. How many others are there? Let's see, I think the set is ctid, oid, xmin, cmin, xmax, cmax, tableoid IIRC, ctid is basically like a physical pointer to where t

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-10 Thread Jack Flak
Steve, Thanks for the excellent suggestion! Yes, that would have worked. I guess I did it the hard way. I wrote a nice little perl script to locate the dups by OID and then pull the data, re-insert it, and then delete the original dup by OID. It was smart, I could run it as many times as ne

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-10 Thread Jack Flak
Stephan, That's very interesting! I didn't even know about these other "hidden" fields. How many others are there? You're right about the xmin value. It's the same for all the dups. That could have saved me a lot of work. I built a perl script to locate the dups, pull the data, re-insert

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-06 Thread Steve Crawford
Would this work for you (if you can muck with the comm table temporarily without causing problems)? --Create a table with unique values create temporary table communique as select distinct * from comm; --Empty the table delete from comm; (or truncate comm if recent enough version or drop and rec

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-06 Thread Tom Lane
Jack Flak <[EMAIL PROTECTED]> writes: > So, once again, here's my question: how do I go about deleting the > duplicate entries WITHOUT also deleting the originals? Perhaps something like CREATE TABLE foo AS SELECT DISTINCT * FROM original; then delete all from original, then INSERT INT

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-06 Thread Stephan Szabo
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

Re: [ADMIN] restore/dup OIDs HELP!

2003-01-06 Thread David F. Skoll
On Sun, 5 Jan 2003, Jack Flak wrote: > So, once again, here's my question: how do I go about deleting the > duplicate entries WITHOUT also deleting the originals? Maybe a dump with some awk/perl magic followed by a restore might be the easiest way. :-( "pg_dump -a -D" might give output that is

[ADMIN] restore/dup OIDs HELP!

2003-01-06 Thread Jack Flak
Greetings Group, I'm running 7.1. Basically, my question is this: how do I delete an exact dup without deleting the original? Let me explain... I just accidentally ran a restore on my perfectly running database. When I originally made the dump file, I had OIDs turned on. I figured they were