Title: Unable to use set returning functions in from clause with ordinality · Issue #2731 · sqlc-dev/sqlc · GitHub
Open Graph Title: Unable to use set returning functions in from clause with ordinality · Issue #2731 · sqlc-dev/sqlc
X Title: Unable to use set returning functions in from clause with ordinality · Issue #2731 · sqlc-dev/sqlc
Description: Version 1.21.0 What happened? column does not exist Relevant log output column "item_object" does not exist Database schema No response SQL queries SELECT code,arr.item_object->> 'code' as resource_code FROM sys_actions, jsonb_array_elem...
Open Graph Description: Version 1.21.0 What happened? column does not exist Relevant log output column "item_object" does not exist Database schema No response SQL queries SELECT code,arr.item_object->> 'code' as resource...
X Description: Version 1.21.0 What happened? column does not exist Relevant log output column "item_object" does not exist Database schema No response SQL queries SELECT code,arr.item_object->> ...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/2731
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to use set returning functions in from clause with ordinality","articleBody":"### Version\r\n\r\n1.21.0\r\n\r\n### What happened?\r\n\r\ncolumn does not exist\r\n\r\n### Relevant log output\r\n\r\n```shell\r\ncolumn \"item_object\" does not exist\r\n```\r\n\r\n\r\n### Database schema\r\n\r\n_No response_\r\n\r\n### SQL queries\r\n\r\n```sql\r\nSELECT code,arr.item_object-\u003e\u003e 'code' as resource_code\r\nFROM sys_actions,\r\n jsonb_array_elements(resources) with ordinality arr(item_object, resource)\r\n WHERE item_object-\u003e\u003e'resource' = sqlc.arg('resource')\r\n LIMIT 1;\r\n```\r\n\r\n\r\n### Configuration\r\n\r\n```yaml\r\nsql:\r\n - schema: \"./sql/schema/\"\r\n queries: \"./sql/query/\"\r\n engine: \"postgresql\"\r\n gen:\r\n go:\r\n package: \"queries\"\r\n out: \"internal/data/queries\"\r\n sql_package: \"pgx/v5\"\r\n emit_json_tags: true\r\n emit_empty_slices: false\r\n emit_result_struct_pointers: true\r\n emit_exported_queries: true\r\n emit_methods_with_db_argument: false\r\n emit_pointers_for_null_types: true\r\n```\r\n\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/4b891b0542344db335f87e02995f28a3d2d98a0b6821747938ceecf73fc38a46\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\n_No response_\r\n\r\n### What type of code are you generating?\r\n\r\n_No response_","author":{"url":"https://github.com/Lay523","@type":"Person","name":"Lay523"},"datePublished":"2023-09-14T17:09:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/2731/sqlc/issues/2731"}
| 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:231de5c1-622f-0088-b760-7de713f5f381 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8484:F97FB:87A93:B395B:6A5236A6 |
| html-safe-nonce | 5bd83a129413d29661da39f9b34af96c0226726b3cc65aa51de416b422218df6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDg0OkY5N0ZCOjg3QTkzOkIzOTVCOjZBNTIzNkE2IiwidmlzaXRvcl9pZCI6Ijc0NzY5NjM0NjE5MjAwNzc0NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2089a1fc3081601c904ba7dc1de7a563621474de066aaa74c37614811cd3201f |
| hovercard-subject-tag | issue:1896988513 |
| 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/2731/issue_layout |
| twitter:image | https://opengraph.githubassets.com/342a0dffa8913918303beb0b31582c5cd425b5fa71e37cf0477d440c6d171af2/sqlc-dev/sqlc/issues/2731 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/342a0dffa8913918303beb0b31582c5cd425b5fa71e37cf0477d440c6d171af2/sqlc-dev/sqlc/issues/2731 |
| og:image:alt | Version 1.21.0 What happened? column does not exist Relevant log output column "item_object" does not exist Database schema No response SQL queries SELECT code,arr.item_object->> 'code' as resource... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lay523 |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width