Flutterby™! : no more dups!

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

no more dups!

2000-12-04 19:32:03+01 by Dan Lyke 2 comments

Sorry about that very first entry popping up there in the comments, I'm testing some code to delete duplicates. I was goaded into this by a post on Hack The Planet.

comments in descending chronological order (reverse):

#Comment made: 2002-02-21 06:30:41+01 by: Dan Lyke

Yabbut... That requires that new entries always get made from a different form. In the case of entries to the main page it's handy to just hit "back" and do the new one. Right now I check for author and text, and in the case of comments rather than entries the entry responded to, being the same. I probably need to do some tweaking of indexes to make it faster (or at least more scalable), depending on how PostgreSQL implements hash indices on large text fields that might be the answer.

#Comment made: 2002-02-21 06:30:40+01 by: baylink

It's easy: just arrange for the entry form to have a hidden serial number field; reject duplicate inserts. If you do it right you can have the DBMS bounce it for you with 0 extra code...

Comment policy

We will not edit your comments. However, we may delete your comments, or cause them to be hidden behind another link, if we feel they detract from the conversation. Commercial plugs are fine, if they are relevant to the conversation, and if you don't try to pretend to be a consumer. Annoying endorsements will be deleted if you're lucky, if you're not a whole bunch of people smarter and more articulate than you will ridicule you, and we will leave such ridicule in place.


Flutterby™ is a trademark claimed by

Dan Lyke
for the web publications at www.flutterby.com and www.flutterby.net.