4 ms·
Is this topological sort ? So, it's a hard solved problem. Because, for example, postgresql order by doesn't allow it by default.
by revskill 4y ago
Is this topological sort ? So, it's a hard solved problem. Because, for example, postgresql order by doesn't allow it by default.
- emodendroket 4y agoI guess the author suggests, why not at least do SORT BY country THEN BY city_name or something like that. Which might be nice, I suppose.
- revskill 4y agoIt's only possible if the address field is not single Text field :)
- emodendroket 4y agoTrue, but it's not even sorted naively as a single string.
- dragonwriter 4y ago> Is this topological sort ? No, neither what it is doing or what it ought to be doing is a topological sort. What it is actually doing seems like “return all matching the stem without any sort [or sorted by ID or some other non-relevant value].” The various things the user suggest are all sorts by fairly simple functions, not the kind of dependency ordering at issue with a topological sort. Choosing the best one to use as a default might be hard, but they aren’t the kind of complex things you can’t implement as a simple order-by once you are set up for it.