Title: xid type is interface when using pgx · Issue #4290 · sqlc-dev/sqlc · GitHub
Open Graph Title: xid type is interface when using pgx · Issue #4290 · sqlc-dev/sqlc
X Title: xid type is interface when using pgx · Issue #4290 · sqlc-dev/sqlc
Description: Version 1.30.0 What happened? I have set. I have a column that is set to xid8 in my postgres table. My understanding is that based on this PR: https://github.com/sqlc-dev/sqlc/pull/2668/changes. XID should be of type Uint32 however I am ...
Open Graph Description: Version 1.30.0 What happened? I have set. I have a column that is set to xid8 in my postgres table. My understanding is that based on this PR: https://github.com/sqlc-dev/sqlc/pull/2668/changes. XI...
X Description: Version 1.30.0 What happened? I have set. I have a column that is set to xid8 in my postgres table. My understanding is that based on this PR: https://github.com/sqlc-dev/sqlc/pull/2668/changes. XI...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/4290
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"xid type is interface when using pgx","articleBody":"### Version\n\n1.30.0\n\n### What happened?\n\nI have set. I have a column that is set to xid8 in my postgres table. My understanding is that based on this PR: https://github.com/sqlc-dev/sqlc/pull/2668/changes. XID should be of type Uint32 however I am generating the code and am getting `interface{}` as the output.\n```\n sql_package: \"pgx/v5\"\n sql_driver: \"github.com/jackc/pgx/v5\"\n```\n\ntable:\n```sql\nCREATE TABLE IF NOT EXISTS audit_context (\n txid xid8 PRIMARY KEY,\n audit_user TEXT,\n request_id TEXT,\n audit_reason TEXT,\n cohort_id BIGINT,\n created_at TIMESTAMPTZ DEFAULT now()\n);\n```\n\nfull config\n```\n# yaml-language-server: $schema=https://raw.githubusercontent.com/sqlc-dev/sqlc/main/internal/config/v_two.json\nversion: \"2\"\nsql:\n - engine: \"postgresql\"\n queries: \"queries\"\n schema: \"pos-db/migrations\"\n strict_function_checks: true\n strict_order_by: true\n gen:\n go:\n package: \"model\"\n out: \".\"\n sql_package: \"pgx/v5\"\n sql_driver: \"github.com/jackc/pgx/v5\"\n emit_empty_slices: true\n query_parameter_limit: 0\n emit_sql_as_comment: true\n emit_interface: true\n overrides:\n # Numeric type overrides\n - go_type: github.com/shopspring/decimal.Decimal\n db_type: pg_catalog.numeric\n - go_type: github.com/shopspring/decimal.NullDecimal\n db_type: pg_catalog.numeric\n nullable: true\n\n # JSONB column-specific overrides (types from libs/jsontypes)\n - column: \"job.metadata\"\n go_type:\n import: \"github.com/Transformity/zeus/libs/jsontypes\"\n type: \"JobMetadata\"\n pointer: true\n\n - column: \"entity.deployment_configuration\"\n go_type:\n import: \"github.com/Transformity/zeus/libs/jsontypes\"\n type: \"DeploymentConfiguration\"\n pointer: true\n```\n - column: \"job_event.metadata\"\n go_type:\n import: \"github.com/Transformity/zeus/libs/jsontypes\"\n type: \"JobMetadata\"\n pointer: true\n```\n\n### Relevant log output\n\n```shell\n\n```\n\n### Database schema\n\n```sql\n\n```\n\n### SQL queries\n\n```sql\n\n```\n\n### Configuration\n\n```yaml\n\n```\n\n### Playground URL\n\n_No response_\n\n### What operating system are you using?\n\nLinux\n\n### What database engines are you using?\n\nPostgresql\n\n### What type of code are you generating?\n\n_No response_","author":{"url":"https://github.com/jay-babu","@type":"Person","name":"jay-babu"},"datePublished":"2026-02-07T14:38:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/4290/sqlc/issues/4290"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0430004a-b9a9-a3f4-ede3-8a29000ef5c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD32:1F14:362804C:4B33595:6A50C45D |
| html-safe-nonce | 5476c4804e340b40b515504b8dee516fbbdddddd2a039bf5d55baf49c4529f44 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDMyOjFGMTQ6MzYyODA0Qzo0QjMzNTk1OjZBNTBDNDVEIiwidmlzaXRvcl9pZCI6Ijg5MDUwMDE0Mzc0MjkyODU5ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e818d185204625d941f37448123a3d338097c3438845d8df466bd4e09fe9f2d1 |
| hovercard-subject-tag | issue:3910423199 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/4290/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c8befe3fb98755c39a65e585026c01025fa84eb5a9ecfa7d03e4db44d4464c41/sqlc-dev/sqlc/issues/4290 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c8befe3fb98755c39a65e585026c01025fa84eb5a9ecfa7d03e4db44d4464c41/sqlc-dev/sqlc/issues/4290 |
| og:image:alt | Version 1.30.0 What happened? I have set. I have a column that is set to xid8 in my postgres table. My understanding is that based on this PR: https://github.com/sqlc-dev/sqlc/pull/2668/changes. XI... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jay-babu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width