Re: Unique rows without a key

From: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
To: Steve Micallef <stevenm(at)ot(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unique rows without a key
Date: 2001-06-13 15:15:24
Message-ID: Pine.LNX.4.21.0106131114130.19889-100000@aluminum.cs.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You could have one additional column that contains a hash of the entire row, so you'd only need a unique index on this hash column.

cheers,
thalis

On Wed, 13 Jun 2001, Steve Micallef wrote:

> Hi,
>
> Is there any way to force every row in a table to be unique without
> creating a unique key?
>
> My tables are fairly large (growing by a gig a day) and creating a primary
> key would basically double my disk usage.
>
> Thanks for your help,
>
> Steve Micallef
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-13 15:25:23 Re: 7.1.2 temporary file area
Previous Message Bruce Momjian 2001-06-13 15:09:09 Re: Re: Does PostgreSQL support EXISTS?