/plushcap/analysis/aiven/explore-the-new-search-and-cycle-features-in-postgresql-14

Explore the new SEARCH and CYCLE features in PostgreSQLĀ® 14

What's this blog post about?

PostgreSQL 14 introduces new features CYCLE and SEARCH, which simplify the writing of recursive queries. This article demonstrates how to use these features in a travel planning scenario. The author creates a database with tables for cities and trips, then uses recursive queries to plan a journey within a budget. The SEARCH option allows users to define the exploration path based on the number of stops or the trip path, while the CYCLE option helps avoid loops. Finally, the article shows how to factor in return trips to Rome using additional joins and conditions.

Company
Aiven

Date published
Dec. 14, 2021

Author(s)
Francesco Tisiot

Word count
2913

Language
English

Hacker News points
1


By Matt Makai. 2021-2024.