Re: Delete duplicated rows - Mailing list pgsql-novice

From papapep
Subject Re: Delete duplicated rows
Date
Msg-id 3F2E9785.9070106@gmx.net
Whole thread Raw
In response to Delete duplicated rows  (papapep <papapep@gmx.net>)
List pgsql-novice
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks to all for your answer (including Duncan that has replied to my
private mailbox), but I think all of them are thinking of removing rows
that have one field that is repeated in other rows.
My problem is that the WHOLE row is repeated, so I have to find
something like this:

FIELDS    1    2    3    4    5    6    7
Row 1    my    car    is    blue    and    very    fast *
Row 2    your     car    is    green    and     quite    fast
Row 3    my    car    is    blue    and    very    fast *
Row 4    my    car    is    blue    and    very    big
Row 5    my    car    is    red    and    very    fast
Row 6    my    car    is    blue    and    very    fast *

* Totally duplicated rows

What do you think about making a query trying to get only the no
duplicated rows, insert them in a temporary table and after deleting all
the rows from the original table reinsert the temporary table's rows
into the empty one?? Perhaps is a little bit silly, but it's the only
way I see....


Thanks once again.

Josep Sànchez
[papapep]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/LpeE2vx52x0kyz4RAvzqAKC1pA27F1u/mzoPs6BY1bFgaGQk6wCeL40U
whmWGXWGT56Ec61vC81yorA=
=exh7
-----END PGP SIGNATURE-----




pgsql-novice by date:

Previous
From: Nabil Sayegh
Date:
Subject: Re: merging 2 dumps / dumping only 1 schema
Next
From: Francisco J Reyes
Date:
Subject: Re: Migration from MySQL, some difficulties with DESCRIBE