Skip to content

plotpg

plot PostgreSQL result sets and analytic functions with gnuplot

plotpg · plot PostgreSQL result sets and analytic functions with gnuplot

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100669plotpgplotpg1.0UTILPostgreSQLC

Usage

Sources:

plotpg renders PostgreSQL query results through the server host’s gnuplot executable. The plot function executes a supplied query through SPI, writes temporary data and scripts, invokes the external program, and returns its output.

CREATE EXTENSION plotpg;
SELECT plot('SELECT price, weight FROM widgets');

The implementation executes caller-supplied SQL and gnuplot commands and uses predictable process-based names under /tmp. Treat its functions as operating-system command capabilities: revoke execution from PUBLIC, grant only to trusted administrators, constrain database and OS permissions, and never pass user input. The project is an old experiment; prefer rendering query results in an application or maintained visualization service.

Table reader