-
Book Overview & Buying
-
Table Of Contents
AI-Ready PostgreSQL 18
By :
This chapter showed how to turn embeddings from an abstract AI concept into a working, production-minded capability inside PostgreSQL.
We started by reinforcing a key distinction: embeddings are specialized vectors, purpose-built to capture semantic meaning. Not every vector is an embedding, and not every embedding is useful unless it can be generated reliably and used repeatedly. To make the idea concrete, we began with the simplest possible workflow: creating an embedding with a curl call and then reproducing the same request in a minimal Python script. That early step matters because it demystifies the process: creating an embedding is not magic. It is a standard API call to a web service that returns a structured list of numbers representing meaning.
Next, we moved the embedding workflow into the database itself. By implementing api.openai_embed in PL/PythonU, PostgreSQL stopped being a passive storage engine and became an active participant in the AI lifecycle...