PostgreSQL
Version 5.0.0
v5.0 tracks the NSchema.Core 5.0 rearchitecture. The provider’s behaviour is unchanged; its seams follow the new core contracts.
Added
newasks for the connection details. The plugin declares host, port, database and username as scaffolding questions and composes the answers into theconnection_stringit writes. The password is deliberately not asked for — it belongs inNSCHEMA_DATABASE_PASSWORD.
Changed
- Updated to NSchema.Core 5.0. The provider now plugs in the core’s
SqlDialect(SQL rendering) andIDatabaseIntrospector(live-schema reading) seams. UsePostgresreplacesUseCurrentSchemaPostgres. The old name referenced a core concept that no longer exists;UsePostgresDialectreplacesUsePostgresGeneratorthe same way.- The plugin is configured by a
DATABASEstatement.Configuretakes the core’s typedPluginSettingsand returns aResult; configuration problems are diagnostics. - An action this dialect cannot execute (e.g. making an existing plain column generated in place) now reports an error diagnostic on the plan instead of throwing.
- Identifiers everywhere in generated SQL are quoted per the core’s case-sensitive identifier model; this now includes role names and trigger function references.
- Revoking table privileges now revokes the specific privileges the plan names rather than
ALL PRIVILEGES. ON DELETE NO ACTION/ON UPDATE NO ACTIONare no longer spelled out on added foreign keys (they are the engine default).- Schema-qualified user-defined type names are now quoted in generated SQL: a column typed as, say,
app.order_statusrenders as"app"."order_status"rather than bare (an unqualified type name is still emitted as-is). - A user-defined type (enum, composite, …) is now read back schema-qualified during introspection instead of losing its schema, so it no longer produces a spurious diff against a schema-qualified declaration.
- Postgres equivalence rules.
UsePostgresnow also registersPostgresSqlEquivalence(standalone:UsePostgresEquivalence) into the core’s comparison seam, so spellings the catalog and a project may legitimately disagree on compare equal in either direction. Introspection still captures exactly what the catalog reports.