Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorDenis Magda

You probably don’t need a collection of specialty databases. Just use Postgres instead! Need a fast, reliable SQL-compliant RDBMS? Just use Postgres! Need to work with geospatial data? Just use Postgres! Handling semi- or non-structured documents? Just use Postgres! Generative AI embeddings? You’ve got it—just use Postgres! Written for software engineers and database pros, Just Use Postgres! shows you how to get the most out of the powerful PostgresSQL database. In Just Use Postgres! you’ll learn how to • Develop generative AI, geospatial, and time-series applications • Everything from transactional RDBMS services to specialized workloads • Modern SQL including window functions, CTEs, and JSON data • Implement full-text search • B-trees, GIN, HNSW, expression, and more • Postgres extensions Since its initial release in 1996, PostgreSQL, aka Postgres, has grown into the most popular and powerful full-featured open source RDBMS available. Just Use Postgres! takes a modern look at Postgres, exploring the database’s most up-to-date features for AI, time-series, full-text search, geospatial, and other application workloads. About the book Just Use Postgres! uses relevant concrete examples to show you how to interact with Postgres as a software developer. Each chapter focuses on a different use case, including an eCommerce application, a music streaming service, and other interesting challenges. You’ll explore the Postgres techniques, features, and capabilities you need to streamline each app’s unique data management issues. From fundamental RDBMS features to an ecosystem of extensions for generative AI and more, you’ll learn how to get the absolute best out of Postgres. What's inside • Generative AI, geospatial, and time-series applications • Modern SQL including window functions and CTEs • Full-text search and JSON • B-trees, GIN, GiST, HNSW, and more About the reader For software developers who know the basics of SQL and relational databases.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, use-case-driven tour of PostgreSQL that argues one database can handle everything from everyday transactions to geospatial queries, full-text search, and AI embeddings — ideal for developers tired of juggling a dozen specialty databases. 【Book Arc】 - **Opening (~0%–5%)**: The book opens with its core thesis — you don’t need a zoo of specialized databases. It frames Postgres as a single, extensible workhorse that covers relational, document, geospatial, time-series, and AI workloads, setting up the "just use Postgres" philosophy that drives every chapter. - **Early (~5%–30%)**: It builds a foundation in modern SQL, walking through window functions, CTEs, and JSON handling. The focus is on practical patterns you’d use in real applications, not academic theory — think eCommerce orders, user sessions, and nested product data. - **Middle (~30%–60%)**: The book shifts to specialized workloads. It demonstrates full-text search with Postgres’ built-in capabilities, then moves into geospatial data using PostGIS-style extensions, showing how to query locations, distances, and polygons without leaving your primary database. - **Late (~60%–85%)**: Time-series data takes center stage — how to model, ingest, and query high-volume timestamped data efficiently. The book also introduces the extension ecosystem, explaining how tools like pgvector and others bolt on new capabilities while keeping a single source of truth. - **Ending (~85%–100%)**: The final stretch ties everything together around generative AI. It covers storing and querying embeddings with HNSW indexes, and discusses index types (B-tree, GIN, GiST, HNSW) in the context of performance tuning. The book closes by reinforcing that Postgres scales from simple CRUD to cutting-edge AI workloads. 【Key Takeaways】 - **One database, many workloads** (Early): The book’s central argument is that Postgres eliminates the operational cost of running separate systems for documents, geospatial, and search. You get consistency and joins across all your data, not silos. - **Modern SQL is your superpower** (Early): Window functions and CTEs let you solve complex analytical problems — rankings, running totals, hierarchical queries — in a single query. This is where you’ll save hours versus pulling data into application code. - **JSON support bridges structured and unstructured** (Early): Postgres treats JSON as a first-class citizen, so you can store semi-structured documents alongside relational rows and query them with SQL. This removes the need for a separate document database for many use cases. - **Full-text search is built in, not bolted on** (Middle): You can implement robust search with ranking, stemming, and phrase matching using Postgres’ native text search. For most apps, this is enough — no need for a dedicated search engine. - **Geospatial queries come via extensions** (Middle): PostGIS-style extensions turn Postgres into a spatial database, handling points, polygons, and distance calculations. The book shows how to combine spatial filters with regular SQL joins. - **Time-series data needs deliberate modeling** (Late): High-volume timestamped data requires partitioning, proper indexing, and careful ingestion patterns. The book offers concrete strategies to keep queries fast as your data grows. - **Indexes are workload-specific** (Late): B-trees for equality and range, GIN for full-text and arrays, GiST for geospatial, HNSW for vector similarity — choosing the right index type is the difference between a snappy app and a slow one. - **AI embeddings are just another data type** (Ending): With extensions like pgvector, you can store embeddings and run similarity searches alongside your transactional data. This makes Postgres a viable backend for generative AI features without adding a vector database. 【Reading Tips】 - **Skim the opening chapters** if you already know SQL basics — the real value starts when the book dives into window functions and JSON. Use those early examples as a refresher, not a deep study. - **Deep-read the index chapter** near the end. The explanations of B-tree, GIN, GiST, and HNSW are the most transferable knowledge — they apply to any database, not just Postgres. - **Follow along with the example apps** (eCommerce, music streaming). The book is structured around concrete scenarios, so coding along with them will cement the patterns far better than passive reading. - **Treat the extension sections as a catalog**, not a manual. You don’t need to memorize every extension — just note which ones exist and what problems they solve, then look up details when you need them. - **Skip the AI chapter if you’re not doing ML work** — but if you are, pay close attention to how embeddings integrate with regular SQL. It’s a rare example of AI and relational data coexisting cleanly. 【Coverage Limits】 The excerpts cover the book’s table of contents, introduction, and closing material, but not the full text of individual chapters. Specific code examples, exact extension names, and detailed query syntax are not available in this guide.
Excerpt 1
书名: Just Use Postgres All the database you need (Denis Magda) (Z-Library) 作者: Denis Magda You probably don’t need a collection of specialty databases. Just u...
View in text
Excerpt 2
JSON • B-trees, GIN, GiST, HNSW, and more About the reader For software developers who know the basics of SQL and relational databases.
View in text
Tags
AI categories
DatabaseBackendProgramming Language
ISBN: 1633435695
Publish Year: 2025
Language: English
Pages: 402
File Format: PDF
File Size: 32.6 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…