Title: Column does not exist error with jsonb_each in Postgres · Issue #1979 · sqlc-dev/sqlc · GitHub
Open Graph Title: Column does not exist error with jsonb_each in Postgres · Issue #1979 · sqlc-dev/sqlc
X Title: Column does not exist error with jsonb_each in Postgres · Issue #1979 · sqlc-dev/sqlc
Description: Version 1.15.0 What happened? When running generate, I get an error about a column not existing even though it should and the select works if I run it directly against a database. Relevant log output query.sql:3:8: column "key" does not ...
Open Graph Description: Version 1.15.0 What happened? When running generate, I get an error about a column not existing even though it should and the select works if I run it directly against a database. Relevant log outp...
X Description: Version 1.15.0 What happened? When running generate, I get an error about a column not existing even though it should and the select works if I run it directly against a database. Relevant log outp...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/1979
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Column does not exist error with jsonb_each in Postgres","articleBody":"### Version\n\n1.15.0\n\n### What happened?\n\nWhen running `generate`, I get an error about a column not existing even though it should and the select works if I run it directly against a database.\n\n### Relevant log output\n\n```shell\nquery.sql:3:8: column \"key\" does not exist\n```\n\n\n### Database schema\n\n```sql\nCREATE TABLE my_table (\r\n data JSONB NOT NULL\r\n);\n```\n\n\n### SQL queries\n\n```sql\n-- name: GetData :one\r\n\r\nSELECT key, value\r\nFROM my_table, jsonb_each(data)\r\nLIMIT 1;\n```\n\n\n### Configuration\n\n```yaml\nversion: \"2\"\r\nsql:\r\n - engine: \"postgresql\"\r\n queries: \"query.sql\"\r\n schema: \"schema.sql\"\r\n gen:\r\n go:\r\n package: \"example\"\r\n out: \"example\"\n```\n\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/51d375a16d47e652835b91f5bcebfd41eeb62da8cfc09a01bcbad790862ac9d8\n\n### What operating system are you using?\n\nLinux, macOS\n\n### What database engines are you using?\n\nPostgreSQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/bretwalker","@type":"Person","name":"bretwalker"},"datePublished":"2022-12-02T14:00:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/1979/sqlc/issues/1979"}
| 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:98277d2a-ed6f-b6d9-c883-99216dc41da3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 987E:726BD:2D6AE18:407CAC6:6A511279 |
| html-safe-nonce | 910484121bcf112095c2dcc8d314ef835e9a00aa788b71f15130eaa771cc74a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODdFOjcyNkJEOjJENkFFMTg6NDA3Q0FDNjo2QTUxMTI3OSIsInZpc2l0b3JfaWQiOiIxNTQ3Mzg2NTU4NTc5MDIwNDA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 774fa3ae1c5a28c3572f3d21e2938e99225396d024dff1d1fd007ddc344743c5 |
| hovercard-subject-tag | issue:1472911581 |
| 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/1979/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c4dc3433d5c88d03535c8f0b99c068492e6b9874a6455bd02fe11184ae47339/sqlc-dev/sqlc/issues/1979 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c4dc3433d5c88d03535c8f0b99c068492e6b9874a6455bd02fe11184ae47339/sqlc-dev/sqlc/issues/1979 |
| og:image:alt | Version 1.15.0 What happened? When running generate, I get an error about a column not existing even though it should and the select works if I run it directly against a database. Relevant log outp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bretwalker |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | f9137f6d981cbbfd780af369f80ce890b2d0d2d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width