Skip to content

Latest commit

 

History

History
85 lines (72 loc) · 6.18 KB

README.md

File metadata and controls

85 lines (72 loc) · 6.18 KB

Native PostgreSQL framework acceptance

For the 10,000-statement common PostgreSQL functional corpus, see corpus/README.md. It includes 40 categories, 400 templates with 25 data variants each, scenario fixtures and strict comparison against a real PostgreSQL server, including result values, OIDs, typmods and SQLSTATEs. The current complete run passed all 10,000 cases without waivers; evidence and binary hashes are in the corpus validation files. Full PostgreSQL compatibility and production qualification remain separate, unmet gates.

These examples use ordinary PostgreSQL drivers and framework backends against MatrixOne's native PostgreSQL listener. They do not patch ORM SQL, use a custom Django backend, or route statements through a MySQL protocol bridge.

Enable postgresql-port = 5432 under [cn.frontend] and start MatrixOne. Use an isolated development instance and a database account with CREATE/DROP DATABASE privileges. Every suite creates databases with unique names and removes them. Do not run destructive acceptance suites against a shared production instance.

For the broader SQL/type/transaction functional gate, see functional/README.md. It runs the same cases against MatrixOne and an actual PostgreSQL reference, retains JSON/XML failure evidence, and does not waive known incompatibilities. The Python and Node suites below also include the advanced ORM scenarios described there.

export MO_PG_DSN='postgresql://root:111@127.0.0.1:5432/mo_catalog?sslmode=disable'
# Install the pinned Python dependencies in a virtual environment first.
python -m pip install -r test/pgwire/python/requirements.txt
# Requires Python 3.12+, Node 20+, Go 1.27.1+, Java 21, Maven 3.9+, JRuby 10, PHP 8.2+ with pdo_pgsql, and ripgrep.
# Ruby: install the checked-in Gemfile.lock dependencies with JRuby/Bundler.
(cd test/pgwire/ruby; jruby -S bundle install)
# PHP: install composer.lock; PDO PostgreSQL, mbstring, XML and curl are required.
(cd test/pgwire/php; composer install --no-interaction --prefer-dist)
test/pgwire/run-frameworks.sh all

Run one ecosystem with python, node, go, java, ruby or php. Set MO_PG_RESULTS_DIR to choose the log directory. Configure your package manager's proxy and CA trust as needed. The script does not download toolchains or change system configuration. MO_PG_RUBY and MO_PG_PHP select interpreter executables. The MatrixOne service and core Go tests require the repository's normal native build dependencies.

Project Versions Acceptance coverage
Django / psycopg 5.2.18 / 3.2.13 Auth/session migrations, forward/reverse application migrations, test database lifecycle, ORM, inspectdb, named cursors
Flask / SQLAlchemy / Alembic 3.1.3 / 2.0.54 / 1.20.0 HTTP CRUD, relation/type reflection, migrations, scalar-column autogeneration, transactions
node-postgres 8.16.3 Named prepares, typed values, bytea, structured errors and failed transaction recovery
TypeORM / Express 0.3.28 / 5.1.0 Schema synchronization, relations, JSON, decimal/time values, nested transactions and real HTTP CRUD
Prisma 6.19.0 Generated client, SQL migrations, nested writes, relation reads, transactional rollback, cascade delete
GORM / Gin 1.31.1 / 1.11.0 Repeated AutoMigrate, constraints and column metadata, prepared batches, relations, nested transactions, HTTP CRUD
Rails / ActiveRecord / AR JDBC 7.2.4 / 7.2.4 / 72.1 Migrations, primary/index/FK reflection, model types/relations, savepoints, constraints, cascade and Rails Rack HTTP cycle
Laravel / Eloquent 12.69.3 Migration repository/up/down, schema, typed model relations, pagination/chunking, nested transactions and HTTP router cycle
Spring Boot / Hibernate / PG JDBC 3.5.7 / 6.6.33.Final / 42.7.8 JPA schema creation, identity keys, relations, decimal values, rollback, JDBC prepares/batches/savepoints, real HTTP CRUD

The Java example uses Hibernate's standard create-only schema mode and JPA IDENTITY generation in a fresh database. This does not certify create-drop, sequence generation or arbitrary Hibernate schema upgrades. Prisma migration SQL is checked into node/prisma/migrations; this is distinct from certifying all of Prisma's introspection and migration-generation features.

See docs/developer/postgresql-frontend.md for implemented semantics, resource bounds and PostgreSQL features that remain unsupported. Passing these applications is a compatibility checkpoint, not a claim that every operation in each ORM or every application built on it works.

Ruby uses Rails 7.2.4 / ActiveRecord 7.2.4 with activerecord-jdbcpostgresql-adapter 72.1 and PostgreSQL JDBC 42.7.11 on JRuby 10.0.2.0. PHP uses Laravel's unmodified PostgreSQL connector, migration runner, Eloquent ORM, schema builder, event dispatcher and HTTP router; Composer locks all package versions. These are integration applications using upstream packages, rather than a run of every upstream project's complete test suite.

All suites can use a TLS DSN with sslmode=verify-full and sslrootcert. Java, Flask and Rails propagate those options to their application pools. Prisma uses its documented sslmode=require, sslaccept=strict and sslcert options when the DSN requests verify-full; this exercises certificate validation with Prisma's connector rather than passing unsupported libpq parameter names. See production/README.md for the independent quota/TLS/transaction stress and owned-process crash recovery acceptance. Run quota exhaustion separately from framework apps. Production rollout still requires the release gates described in docs/developer/postgresql-frontend.md.

Current supplemental functional coverage is 2,468 cases, including 1,604 new scenarios (401 SQL templates across four wire/preparation modes). Application acceptance has 107 scenarios across six languages. The normal ORM adapters generate simultaneous multi-column UPDATE statements and verify original-row values and rollback. The official raw-output gate remains failing, and its 119 isolation inputs cannot execute permutations while the blocking-detection hook is missing. See functional/validation-summary.json and official/validation-summary.json for measured limits.