Re: Unique rows without a key
От | Doug McNaught |
---|---|
Тема | Re: Unique rows without a key |
Дата | |
Msg-id | m3vglzm73b.fsf@belphigor.mcnaught.org обсуждение исходный текст |
Ответ на | Re: Unique rows without a key ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>) |
Ответы |
Re: Unique rows without a key
|
Список | pgsql-general |
"Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu> writes: > > Thanks for your help. However I was thinking more along the lines of using > > the table itself as the index. Creating a hash column with all the other > > columns as part of it still significantly increases my table size. > > It's not that much of an overhead especially if your table has many > attributes. There is a function hashname() that will return an > integer after hashing the text it takes as argument. I didn't find > any documentation, but seems to work. If it's not documented I'd worry about it going away in the future. > Then you just add a unique index on hashval and you are done :-) And if you get a hash collision? Going to disallow a perfectly legitimate and unique row because of it? -Doug -- The rain man gave me two cures; he said jump right in, The first was Texas medicine--the second was just railroad gin, And like a fool I mixed them, and it strangled up my mind, Now people just get uglier, and I got no sense of time... --Dylan
В списке pgsql-general по дате отправления: