Handling Time-Variant DAGs with Constraints in Postgres
Vehicle attachments in a fleet (trucks pulling trailers) are modeled as a time-variant DAG in a single Postgres table of edges with validity intervals and a source-authority priority.
Vehicle attachments in a fleet (trucks pulling trailers) are modeled as a time-variant DAG in a single Postgres table of edges with validity intervals and a source-authority priority.
A Kalman Filter can run entirely inside Postgres to smooth noisy GPS tracks, with per-device state (estimate plus covariance matrix) kept in a devices table and a kalman_step SQL function applying predict/update steps that can use HDOP or speed.
The ten most installed Postgres extensions across Neon's platform are plpgsql and pg_stat_statements (each in 1M+ databases), followed by uuid-ossp, pgvector, pgcrypto, pg_trgm, PostGIS, citext, unaccent and hstore.
pg_cron stores scheduled jobs as raw SQL text, separate from Postgres' system catalogs, so dropping a table leaves jobs that fail every run with "relation does not exist" and fill cron.job_run_details with errors.
A simple S3-like file server can be built inside Postgres by storing binary data in a BYTEA table and exposing it through PostgREST's functions-as-RPC via the Neon Data API.
Testing against SQLite when production runs Postgres gives false confidence.
Postgres and SQL Server share SQL but differ in dialect details that trip up migrating developers.
Postgres 17 is available on Neon for all plans, including Free, and can be provisioned in a few steps.
Postgres 17 adds RETURNING support to MERGE (with a merge_action() function that reports whether each row was inserted, updated or deleted), SQL/JSON functions including JSON_TABLE for turning JSON into relational rows, and performance work.
Even when writes are off the table, heavily indexing read-only Postgres tables only pays off under certain conditions: table size, query complexity, data cardinality and resource constraints.
Postgres's btree_gist extension lets a single GiST index combine one-dimensional B-Tree-style columns (like dates) with spatial PostGIS geometries, so queries filtering on both space and time can use one index scan.
Database round-trip latency compounds with every sequential query, so co-locating the backend with the database and cutting round trips matters more than raw query speed.