Re:The surprisingly difficult problem of user-defined order ...
by ramraj07 on Saturday January 16, 2021 @06:00AM
(#25801495)
I ran into this problem and instead of solving it the proper way I took the lazy route by adding a unique constraint on the column and when it threw an errror in the insert I just added one more extra letter!
[ Parent
| on HN ]
Re:The surprisingly difficult problem of user-defined order ...
by n4r9 on Saturday January 16, 2021 @09:34AM
(#25802385)
It's a neat idea, but this edge case makes it seem a lot like the "arbitrary precision" version of Option 2 except slightly worse on all counts. You're taking up more storage and the inserts are a lot less elegant.
Also, what about when you want to initialise a list with more than 30 elements? Do you get to "z" then continue with "za", "zb"... ?