Title: Handle PostgreSQL system columns · Issue #1745 · sqlc-dev/sqlc · GitHub
Open Graph Title: Handle PostgreSQL system columns · Issue #1745 · sqlc-dev/sqlc
X Title: Handle PostgreSQL system columns · Issue #1745 · sqlc-dev/sqlc
Description: Version 1.14.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. Example db-fiddle Not sure if this should be a...
Open Graph Description: Version 1.14.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. Exampl...
X Description: Version 1.14.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/1745
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handle PostgreSQL system columns","articleBody":"### Version\r\n\r\n1.14.0\r\n\r\n### What happened?\r\n\r\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\nExample [db-fiddle](https://www.db-fiddle.com/f/xzTA5XuPmk2JLkWhJ6UJKd/0)\r\n\r\nNot sure if this should be a bug report or a feature request.\r\n\r\n### Relevant log output\r\n\r\n```shell\r\ncolumn \"ctid\" does not exist\r\n```\r\n\r\n\r\n### Database schema\r\n\r\n```sql\r\nCREATE TABLE test (\r\n id INT\r\n);\r\n```\r\n\r\n\r\n### SQL queries\r\n\r\n```sql\r\nSELECT ctid FROM test;\r\n```\r\n\r\n\r\n### Configuration\r\n\r\n```yaml\r\nversion: 2\r\nsql:\r\n- schema: sql/schema.sql\r\n queries: sql/queries.sql\r\n engine: postgresql\r\n gen:\r\n go:\r\n out: internal/sql\r\n```\r\n\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/0a3172295b4a8b1a7dd1f78f56a864425724d1d5118c73a45f2fd313733c6910\r\n\r\n### What operating system are you using?\r\n\r\n_No response_\r\n\r\n### What database engines are you using?\r\n\r\nPostgreSQL\r\n\r\n### What type of code are you generating?\r\n\r\nGo","author":{"url":"https://github.com/ndrpnt","@type":"Person","name":"ndrpnt"},"datePublished":"2022-07-14T23:30:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1745/sqlc/issues/1745"}
| 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:5c78d826-eb70-c7ee-7ec1-d7edb4ba3847 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C304:2A0782:1DD0632:288D509:6A5380CC |
| html-safe-nonce | 75e8c3513e15bf6e40cb413881af66921f7bc1b6ee3d87f7444ef6614bb2ef1f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzA0OjJBMDc4MjoxREQwNjMyOjI4OEQ1MDk6NkE1MzgwQ0MiLCJ2aXNpdG9yX2lkIjoiNDU4NTI0NDE4MjkwMjQ0MDE0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d908713941daa3dd160b84153b7b00c73cb406ffd55ff1119c7ce5f660ffa0dc |
| hovercard-subject-tag | issue:1305408422 |
| 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/1745/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b308f346abc5e3aabd6aa42b444c36c1d04e54b432fb33e32086d916f6c9b634/sqlc-dev/sqlc/issues/1745 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b308f346abc5e3aabd6aa42b444c36c1d04e54b432fb33e32086d916f6c9b634/sqlc-dev/sqlc/issues/1745 |
| og:image:alt | Version 1.14.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. Exampl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ndrpnt |
| 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