nr_model
AI-powered Autonomous Data System
nr_model · AI-powered Autonomous Data System
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (nr_model.control)
- Official extension SQL (nr_model–1.0.0.sql)
nr_model — pg-model is a simple extension to Postgres that allows model management and in-database inference. Use it for the corresponding vector, model, or retrieval workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
pgm_get_model_id_by_name(model_name text)is an extension function and returnsINT.pgm_predict_float4(model_name text, input anyarray)is an extension function and returnsSETOF.pgm_predict_table(model_name text, batch_size int, table_name text, column_names text[])is an extension function and returnsSETOF.pgm_register_model(model_name text, model_path text)is an extension function and returnsBOOL.pgm_store_model(model_name text, model_path text)is an extension function and returnsBOOL.pgm_unregister_model(model_name text)is an extension function and returnsBOOL.layeris a table installed or managed by the extension.modelis a table installed or managed by the extension.routeris a table installed or managed by the extension.
Requirements and Caveats
- The reviewed control file declares default version
1.0.0. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.