Skip to content

fix: refuse system column names for user columns (4.0.3) - #17

Merged
RiyaSharma03 merged 1 commit into
mainfrom
fix/system-column-names
Oct 7, 2026
Merged

RiyaSharma03 merged 1 commit into
mainfrom
fix/system-column-names

Conversation

@RiyaSharma03

Copy link
Copy Markdown
Collaborator

create table t (xmin text) is rejected by Postgres (42701 column name "xmin" conflicts with a system column name) and pg-mem accepted it. Now refused for tableoid, xmin, cmin, xmax, cmax, ctid in CREATE TABLE, ADD COLUMN and RENAME COLUMN. A differently-cased quoted name ("Xmin") or a query alias is still fine, as in Postgres.

Found by rapidnative-website's test:ts-schema and test:nativewind-migration, which use exactly this as "SQL Postgres rejects" to check the converter aborts (RapidNative/rapidnative-website#2449 CI).

Checks:

  • bun test: 1346 pass, 0 fail (new case in corpus-parity.spec.ts)
  • rapidnative-website against this build: every CI suite passes as on main (test:agent needs Supabase env locally, fails the same on main)
  • 120 production projects, validator on PGlite vs this build: 0 differences

Version 4.0.3.

🤖 Generated with Claude Code

`create table t (xmin text)` is rejected by postgres ("column name "xmin"
conflicts with a system column name") and was accepted here. Covers
CREATE TABLE, ADD COLUMN and RENAME COLUMN. Found by rapidnative-website's
converter tests, which use it as SQL postgres must reject.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RiyaSharma03
RiyaSharma03 merged commit 70baf37 into main Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant