Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Postgres guide walks a pg project through draft, migrate, generate and runtime use, verified end to end against the docker-compose Postgres in packages/pg/test. It lists the gaps found while verifying: the simplified schema reader in packages/pg/src/impl/schema.ts drops serial/identity, enums, domains, functions, triggers, matviews, extensions, non-public schemas and generated columns, and pg typegen differs from SQLite for limit 1, returning, and nullable params. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs called Postgres a runtime adapter with toolchain docs 'still in progress'. Postgres has a working dialect (draft, migrate, check, generate, format, UI), so: README documents the dialect config key and points limitations at the guide's known gaps; adapters, errors, formatter, lint plugin and schema-diff pages say what's true for pg today (including that pg errors are always kind 'unknown'); the intro blog post links the guide; @sqlfu/pg gets a README so its npm page isn't empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main added a celld guide alongside the Postgres guides here. Both sides appended to the Guides description in sync-docs.mjs; kept both and regenerated llms.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createNodePostgresClient returns kind 'unknown' for every Postgres error except syntax errors (which only match via the SQLite message fallback). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createNodePostgresClient errors now get a real SqlfuError.kind. The classifier reads the SQLSTATE from the pg error's .code and is picked by client.system, so the SQLite adapters are unchanged. mapSqliteDriverError is renamed mapDriverError since it now covers both. Removes the Errors note from the Postgres guide's Known gaps, adds a kind -> SQLite / SQLSTATE table to docs/errors.md, and ticks the step-three item in tasks/pg.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md # packages/sqlfu/README.md # packages/sqlfu/docs/errors.md # packages/sqlfu/docs/guides/postgres.md # tasks/pg.md
commit: |
Collaborator
Author
|
🤖 Moved into the shared Postgres PR #159 (branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #160, which GitHub closed when its base branch (
pg-docs) was deleted after #156 merged.Postgres errors from
createNodePostgresClientnow get a realSqlfuError.kind, mapped from the SQLSTATE. Until now every Postgres error came back askind: 'unknown'.syntax42601missing_table42P01missing_column42703unique_violation23505(primary keys too)not_null_violation23502foreign_key_violation23503check_violation23514transient40001serialization failure,40P01deadlock,55P03lock not availableEverything else stays
'unknown', and the SQLSTATE is still on.cause.code.classifyPostgresErrorinpackages/sqlfu/src/errors.tsmapSqliteDriverError→mapDriverError, picking the classifier bysystemwrapSyncClientErrors/wrapAsyncClientErrorsalready readclient.system.'postgresql'now gets the SQLSTATE classifier, so none of the 12 SQLite adapters change.packages/pg/test/client-errors.test.tsunknowncase, each produced by a real Postgres (the docker-compose one CI already runs for@sqlfu/pg). The transient tests make real lock contention:for update nowaitagainst a held row lock, and a repeatable-read write conflict.docs/errors.md,docs/guides/postgres.md,README.md'unknown'" notes (added in #156). Add a kind → SQLite / SQLSTATE table to the errors page.tasks/pg.md,tasks/complete/2026-10-29-pg-error-kinds.mdDecisions worth a look:
transientmeans lock contention or a serialization conflict, where retrying the transaction usually works, like SQLite's BUSY/LOCKED. Connection-level failures (class08,57P01,53300) stayunknown.permission_denied(42501) for when pg landed. That's left for a follow-up.syntaxtest already passed, but only because the SQLite message fallback matched "syntax error at or near". Postgres errors no longer go through that fallback.Session:
cae4911f-3ee7-4867-864d-076bcf92f7ac🤖 Generated with Claude Code
Package size — packed 281.2 kB (+492 B, +0.2%)
Package size
dist/vendor/*.jsbundlesvendor/sha256.jsvendor/sql-formatter/*.jsvendor/sqlfu-sqlite-parser/*.jsvendor/standard-schema/*.jsvendor/typesql/*.jsMeasured with
npm pack --dry-run --jsononsqlfu(0.0.0-dev on main vs 0.0.0-dev on this PR).