Skip to content

codegen: map postgres json/jsonb to json.RawMessage for wpgx#11

Merged
Stumble merged 1 commit intoStumble:mainfrom
colinisme:colin/json-type
Jan 27, 2026
Merged

codegen: map postgres json/jsonb to json.RawMessage for wpgx#11
Stumble merged 1 commit intoStumble:mainfrom
colinisme:colin/json-type

Conversation

@colinisme
Copy link

No description provided.

@colinisme
Copy link
Author

Background: POSTGRES_ISPROXY=true forces pgx Exec mode, which treats []byte as bytea, so JSON columns were being sent as binary and failing with invalid input syntax for type json. We updated sqlc’s Postgres→Go mapping (including the wpgx branch) and service helpers to emit json.RawMessage for JSON/JSONB columns, so pgx now encodes them as JSON text consistently in both proxy and direct modes.

@Stumble Stumble merged commit 45952f7 into Stumble:main Jan 27, 2026
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.

2 participants

Comments