pg_forecast
pg_forecast · Incremental in-database ARIMA time-series forecasting
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102194 | pg_forecast | pg_forecast | 1.0 | TIME | C |
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
- README.md
- src/pg_forecast/Makefile
- src/pg_forecast/sql/functions/_common.sql
- src/pg_forecast/pg_forecast.control
pg_forecast fits ARIMA models, forecasts time-series values and updates model state through triggers. This research implementation links to libnlopt; the SQL version 1.0 is generated from the source SQL fragments by its Makefile.
Core Workflow
Populate the source table with representative ordered time-series observations before calling the training and forecasting functions.
Operational Boundaries
create_forecast() trains a named model for a source table, date column and value column. run_forecast() returns forecast dates and values for a horizon and interval; remove_forecast() removes the registered model. The implemented model is autoarima. Model tables and insertion triggers are persistent database objects. Several routines use SECURITY DEFINER and the public schema: deploy only in a database whose object-creation privileges and function access are controlled. Installation uses the control-file superuser default. Upstream gives a PostgreSQL 18 installation example but no full compatibility matrix or clear license declaration.