Title: Postgres system columns not working · Issue #3742 · sqlc-dev/sqlc · GitHub
Open Graph Title: Postgres system columns not working · Issue #3742 · sqlc-dev/sqlc
X Title: Postgres system columns not working · Issue #3742 · sqlc-dev/sqlc
Description: Version 1.27.0 What happened? sqlc currently errors out with column "…" does not exist when referencing a PostgreSQL system column (tableoid, xmin, cmin, xmax, cmax or ctid) in an SQL query. There was already a pull request that should f...
Open Graph Description: Version 1.27.0 What happened? sqlc currently errors out with column "…" does not exist when referencing a PostgreSQL system column (tableoid, xmin, cmin, xmax, cmax or ctid) in an SQL query. There ...
X Description: Version 1.27.0 What happened? sqlc currently errors out with column "…" does not exist when referencing a PostgreSQL system column (tableoid, xmin, cmin, xmax, cmax or ctid) in an SQL que...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3742
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Postgres system columns not working","articleBody":"### Version\n\n1.27.0\n\n### What happened?\n\nsqlc currently errors out with column \"…\" does not exist when referencing a PostgreSQL [system column](https://www.postgresql.org/docs/current/ddl-system-columns.html) (tableoid, xmin, cmin, xmax, cmax or ctid) in an SQL query.\r\n\r\nThere was already a pull request that should fix this. And there are tests to make sure this is working. See here [1745](https://github.com/sqlc-dev/sqlc/issues/1745)\r\n\r\nIn this thread, there was a comment, that its not working with 1.25. Sadly its also not working with 1.27. And if you change the version to 1.23 in the playground, its also not working.\n\n### Relevant log output\n\n```shell\nquery.sql:2:8: column \"xmin\" does not exist\n```\n\n\n### Database schema\n\n```sql\nCREATE TABLE authors (\r\n id BIGSERIAL PRIMARY KEY,\r\n name text NOT NULL,\r\n bio text\r\n);\n```\n\n\n### SQL queries\n\n```sql\nSELECT xmin, cmin, xmax, cmax, ctid FROM authors;\n```\n\n\n### Configuration\n\n```yaml\n{\r\n \"version\": \"2\",\r\n \"sql\": [{\r\n \"schema\": \"schema.sql\",\r\n \"queries\": \"query.sql\",\r\n \"engine\": \"postgresql\",\r\n \"gen\": {\r\n \"go\": {\r\n \"out\": \"db\"\r\n }\r\n }\r\n }]\r\n}\n```\n\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/db9040344439ff1fcf601ba3e93486fca3e1b2c0644fb46e4563bbf81c675116\n\n### What operating system are you using?\n\n_No response_\n\n### What database engines are you using?\n\n_No response_\n\n### What type of code are you generating?\n\n_No response_","author":{"url":"https://github.com/werjo-gridfuse","@type":"Person","name":"werjo-gridfuse"},"datePublished":"2024-12-12T15:38:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/3742/sqlc/issues/3742"}
| 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:2a1b1c97-dacc-90e7-c8ca-40086a14daa3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A972:28D644:169FBB8:1E2022D:6A52B3F8 |
| html-safe-nonce | 978c7fc195302b74178c9a51a1814c0410ab0515b8a3f3919e1e353f3d9728a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTcyOjI4RDY0NDoxNjlGQkI4OjFFMjAyMkQ6NkE1MkIzRjgiLCJ2aXNpdG9yX2lkIjoiNjI1NTM2NDI0OTEzNDIxNjE4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e749bc7cc39ec680ef3bb9448465f7792dd5fff15eb28ac10089ce2a2a5e0ed |
| hovercard-subject-tag | issue:2736250695 |
| 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/3742/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1adf8e03efffeba71dc9213adee02fafb702d6ff2922e62ba3a1f3788823c167/sqlc-dev/sqlc/issues/3742 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1adf8e03efffeba71dc9213adee02fafb702d6ff2922e62ba3a1f3788823c167/sqlc-dev/sqlc/issues/3742 |
| og:image:alt | Version 1.27.0 What happened? sqlc currently errors out with column "…" does not exist when referencing a PostgreSQL system column (tableoid, xmin, cmin, xmax, cmax or ctid) in an SQL query. There ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | werjo-gridfuse |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width