no more dups!
2000-12-04 18:32:03+00 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.
2000-12-04 18:32:03+00 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 ascending chronological order (reverse):
#Comment made: 2002-02-21 05:30:40+00 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 made: 2002-02-21 05:30:41+00 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.