Practical overview
When it fits
Use MorphingDB when you want inference and vector handling close to PostgreSQL data, and can implement model-specific input/output handlers and rebuild the extension as needed.
Who it is for
- Teams running deep-learning inference against data already stored in PostgreSQL.
- Developers who want SQL queries to return model predictions alongside database records.
- Database builders storing preprocessed vectors with shape information for use by libtorch.
Documented uses
- Import a libtorch model and create predictions from values in a PostgreSQL table.
- Use task-oriented inference, such as the documented image-classification query.
- Batch predictions using SQL window functions.
- Store, retrieve and operate on vectors with the mvec type.
Requirements & limits
The README documents a Docker image and a build-from-repository option, followed by connecting to PostgreSQL and enabling the pgdl extension.
- Model integration requires writing input and output handlers in src/external_process, then rebuilding and installing the extension.
- Prediction examples accept CPU or GPU as a query argument.
- The mvec type stores vector dimension or shape information and supports documented retrieval and basic operations.
- The documented deployment path uses Docker and PostgreSQL.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Enable MorphingDB in a Docker-hosted PostgreSQL instance
Set up the documented container and enable its PostgreSQL extension.
Before you start
- Docker and the MorphingDB project directory
- A model directory and PostgreSQL data directory to mount
- An absolute path for the MorphingDB test directory referenced in the container example
Steps
Download and unzip the model archive into the project’s model directory.
Pull the morphingdb/morphingdb:latest image or build an image from the project directory.
Create a container using the documented mounts for the test directory, model directory and database data directory, and publish the PostgreSQL port.
Enter the container, connect to PostgreSQL with psql, and run CREATE EXTENSION pgdl;
Expected outcome
A PostgreSQL instance running in the MorphingDB container with the pgdl extension enabled.
Guide limitations
- The documented container command uses placeholder paths and port values that must be supplied.
- This setup guide does not cover importing a model or running a prediction.
Register a model and query predictions
Follow the documented SQL and handler stages for using a model with database data.
Before you start
- A MorphingDB PostgreSQL instance with the pgdl extension enabled
- A model path and model-specific input and output handlers
Steps
Call create_model with the model name, model path, base model and description.
Write the model’s input and output handlers in src/external_process, then rebuild and install the extension.
Call register_process().
Use predict_float or predict_text in a query over a table, specifying the model, CPU or GPU, and input column.
Expected outcome
A registered model can be used in documented SQL prediction queries over table data.
Guide limitations
- The README requires custom input and output handlers for the created model.
- The guide does not establish that a particular model, handler or hardware configuration will work.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Morphingdb | Import a libtorch model and create predictions from values in a PostgreSQL table. | Docker, Linux, Self-hosted, Server | The README documents a Docker image and a build-from-repository option, followed by connecting to PostgreSQL and enabling the pgdl extension. |
| Gateway — pyadav | Send chat-completion requests to a provider through a common server endpoint. | Server | The repository is public and identifies the project as Apache-2.0 licensed. README installation instructions include binaries, platform package managers and Docker. |
| Stable Diffusion Tritonserver | Build a Docker image containing the Triton serving setup. | Docker, Linux, Self-hosted, Server | The repository is public and lists an Apache-2.0 license. The documented deployment is self-hosted and uses Docker; no hosted service is described. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- MorphingDB/MorphingDB · Official homepage title · retained in its source language

