Skip to content

sql-driver: one emission-identity source — loud refusal for redshift/cockroachdb DDL, pgnative joins the Postgres family (#11756 ruling) #11991

Description

@os-support-ai

Implementation of the #11756 ruling (maintainer, 2026-08-25, verbatim 「同意」 on the presented 「C,但 pgnative 归入 Postgres 家族」; full record = #11756 comment 5404884704). Filed by PM session session_01KWRU3s15AJz7PGW7a7wdCh per the confirmed checklist.

Content:

  1. Converge the three inconsistent judgment tables in packages/drivers/driver-sql/src/sql-driver.ts (isPostgres getter · DIALECT_CONNECT_TIMEOUT · POSTGRES_WIRE_CLIENTS) into one emission-identity source, with the other tables as declared extensions over it. Premise-first: re-verify the spellings on the current tree (git grep -n "isPostgres\|DIALECT_CONNECT_TIMEOUT\|POSTGRES_WIRE_CLIENTS" origin/main -- packages/drivers/driver-sql/src/sql-driver.ts).
  2. redshift / cockroachdb: wire recognition stays (connection/parsing per driver-sql: every Field.date read from PostgreSQL is one day early when the process TZ is east of UTC — toDateOnly() reads UTC components off a local-midnight Date #11389, deliberate); ⛔ no emission identity. A configuration reaching the DDL-emission path gets an immediate named refusal with guidance (which configurations are supported) — never a silently mis-built table.
  3. pgnative: joins the Postgres family for emission (knex resolves it to the same postgresql dialect — measured on [Decision] 会说 Postgres 方言的另外两种数据库(Redshift、CockroachDB),平台要不要当 Postgres 来建表?(#11550 的宽半边) #11756) AND enters the wire table (absent from both today), including the calendar-day parser pin the wire table carries.
  4. Rewrite the deliberately-pinned cases in packages/drivers/driver-sql/src/sql-driver-11550-dialect-client-spellings.test.ts (landed by PR fix(driver-sql): recognise knex's canonical postgres / sqlite client spellings in the dialect getters #11783 under a docblock naming [Decision] 会说 Postgres 方言的另外两种数据库(Redshift、CockroachDB),平台要不要当 Postgres 来建表?(#11550 的宽半边) #11756) — the rewrite IS the ruling landing; do it explicitly, never as refactor fallout.
  5. mariadb: ⛔ out of this ruling's scope — stays unrecognised; do not fold it in.

Discipline: Clause-② — assess at claim time against the tree, expected yes (previously-proceeding configurations now refuse loudly; pgnative gains emission — accept/reject behaviour changes in both directions); contract-review tier expected.

Acceptance criterion: a stack configured with redshift or cockroachdb that reaches DDL emission receives one named, actionable refusal (code + message pinned); pgnative behaves identically to pg for emission and carries the wire parser pin; the emission-identity answer has exactly one source of truth.

Reopening condition recorded on #11756: evidence of a real Redshift/CockroachDB customer reopens toward recognition, with a measured DDL boundary and the two databases judged separately.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions