Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses

submited by
Style Pass
2024-06-09 11:00:16

Which means, that to test it, we need some data for recursive queries. This time I took directory listing of my /etc, and loaded it to db:

Let's try to get the previous output, ascii-betical order, using this new approach, but also, let's see what ordercol really is:

So, I can see now, that in this sort – etc/apparmor/X is actually before /etc/apparmor.d/X. Which kinda makes sense. Let's compare the two orders on their own:

Please note that apparmor/init and apparmor/init/network-interface-security are in much better place now – immediately after apparmor/, and not apparmor.d. Nice!

This is as really cool. What's more – I didn't even had to add any condition on the is_cycle, it was sufficient that it's calculated, and processing stopped. And I can still add “WHERE is_cycle = false" to weed out the connections that cycle back to city that was already visited:

Leave a Comment