Title: Aliasing a subquery fails to compile · Issue #159 · sqlc-dev/sqlc · GitHub
Open Graph Title: Aliasing a subquery fails to compile · Issue #159 · sqlc-dev/sqlc
X Title: Aliasing a subquery fails to compile · Issue #159 · sqlc-dev/sqlc
Description: The following SQL used to cause sqlc to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL: CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NU...
Open Graph Description: The following SQL used to cause sqlc to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL: CREATE TABLE authors ( id...
X Description: The following SQL used to cause sqlc to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL: CREATE TABLE authors ...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/159
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Aliasing a subquery fails to compile","articleBody":"The following SQL used to cause `sqlc` to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL:\r\n\r\n```sql\r\nCREATE TABLE authors (\r\n id BIGSERIAL PRIMARY KEY,\r\n name TEXT NOT NULL,\r\n bio TEXT\r\n);\r\n\r\n-- name: SubAuthors :many\r\nSELECT sub.name FROM (SELECT * FROM authors) sub\r\n```\r\n\r\nsqlc returns the following error:\r\n\r\n```\r\nquery.sql:x:y: column \"name\" does not exist\r\n```\r\n\r\ncc @arddor","author":{"url":"https://github.com/kyleconroy","@type":"Person","name":"kyleconroy"},"datePublished":"2019-12-12T21:04:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/159/sqlc/issues/159"}
| 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:028cadf6-cdda-862b-736b-c1a996eea0c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8E2:3E37F3:1AE5B6D:2398319:6A51D330 |
| html-safe-nonce | 7d81cb6ca6044478048afab719cdce1c5ff8b7ef7b3eefe4e3f62c1bca1cd2ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEUyOjNFMzdGMzoxQUU1QjZEOjIzOTgzMTk6NkE1MUQzMzAiLCJ2aXNpdG9yX2lkIjoiNDg1NDgyNzE1NTM3OTU3MzU1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9a921bed04fe50916b2d7d092cbab8cdfccc716a18cd6a6b62081e5c301f0fdd |
| hovercard-subject-tag | issue:537212629 |
| 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/159/issue_layout |
| twitter:image | https://opengraph.githubassets.com/704151008498d5ffe87b162986b510c8e64f466f3661bc10c7a98589cf6b9ebb/sqlc-dev/sqlc/issues/159 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/704151008498d5ffe87b162986b510c8e64f466f3661bc10c7a98589cf6b9ebb/sqlc-dev/sqlc/issues/159 |
| og:image:alt | The following SQL used to cause sqlc to panic. That was fixed in #158. Sadly, sqlc still can't handle the aliasing of a subquery. When trying to compile the following SQL: CREATE TABLE authors ( id... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kyleconroy |
| 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