René's URL Explorer Experiment


Title: sqlc crashes when calling a function with OUT arg · Issue #1654 · sqlc-dev/sqlc · GitHub

Open Graph Title: sqlc crashes when calling a function with OUT arg · Issue #1654 · sqlc-dev/sqlc

X Title: sqlc crashes when calling a function with OUT arg · Issue #1654 · sqlc-dev/sqlc

Description: Version 1.13.0 What happened? I tried to call a function which has an OUT argument. I am seeing sqlc crash a lot when I try to do this. I realize I might have botched the syntax or something somewhat, but the crash is making diagnosis of...

Open Graph Description: Version 1.13.0 What happened? I tried to call a function which has an OUT argument. I am seeing sqlc crash a lot when I try to do this. I realize I might have botched the syntax or something somewh...

X Description: Version 1.13.0 What happened? I tried to call a function which has an OUT argument. I am seeing sqlc crash a lot when I try to do this. I realize I might have botched the syntax or something somewh...

Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/1654

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlc crashes when calling a function with OUT arg","articleBody":"### Version\r\n\r\n1.13.0\r\n\r\n### What happened?\r\n\r\nI tried to call a function which has an OUT argument.  I am seeing sqlc crash a lot when I try to do this.  I realize I might have botched the syntax or something somewhat, but the crash is making diagnosis of the problem harder.\r\n\r\n### Relevant log output\r\n\r\n```shell\r\nsqlc generate failed.\r\n\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe77599]\r\n\r\ngoroutine 1 [running]:\r\ngithub.com/kyleconroy/sqlc/internal/compiler.sourceTables(0xc00051f0a0, {0x14205a0, 0xc00037dd90})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/compiler/output_columns.go:409 +0x639\r\ngithub.com/kyleconroy/sqlc/internal/compiler.outputColumns(0xc00051f0a0, {0x14205a0, 0xc00037dd90})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/compiler/output_columns.go:54 +0x56\r\ngithub.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQuery(0xc000424000, {0x1420340, 0xc0002159a0}, {0xc000418480, 0x21a}, {0x0, {0x0, 0x0, {0x0, 0x0}}})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/compiler/parse.go:114 +0x8bf\r\ngithub.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQueries(0xc000424000, {0x20, {0x20, 0x45, {0x0, 0x1}}})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/compiler/compile.go:108 +0x513\r\ngithub.com/kyleconroy/sqlc/internal/compiler.(*Compiler).ParseQueries(...)\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/compiler/engine.go:49\r\ngithub.com/kyleconroy/sqlc/internal/cmd.parse({_, _}, {_, _}, {_, _}, {_, _}, {{0xc0002294a6, 0xa}, ...}, ...)\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/cmd/generate.go:262 +0x253\r\ngithub.com/kyleconroy/sqlc/internal/cmd.Generate({0x14343d0, 0xc00004e040}, {0x80, 0x46}, {0xc00004a3c0, 0x57}, {0x0, 0x101e900}, {0x14250e0, 0xc000010020})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/cmd/generate.go:183 +0x7bb\r\ngithub.com/kyleconroy/sqlc/internal/cmd.glob..func3(0x1d3bcc0, {0x116a2e3, 0x0, 0x0})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/cmd/cmd.go:144 +0x194\r\ngithub.com/spf13/cobra.(*Command).execute(0x1d3bcc0, {0x2366b60, 0x0, 0x0})\r\n\t/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860 +0x5f8\r\ngithub.com/spf13/cobra.(*Command).ExecuteC(0xc0002fea00)\r\n\t/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bc\r\ngithub.com/spf13/cobra.(*Command).Execute(...)\r\n\t/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902\r\ngithub.com/spf13/cobra.(*Command).ExecuteContext(...)\r\n\t/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:895\r\ngithub.com/kyleconroy/sqlc/internal/cmd.Do({0xc00003c050, 0x1, 0x1}, {0x14250a0, 0xc000010010}, {0x14250e0, 0xc000010018}, {0x14250e0, 0xc000010020})\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/internal/cmd/cmd.go:47 +0x4ba\r\nmain.main()\r\n\t/go/pkg/mod/github.com/kyleconroy/sqlc@v1.13.0/cmd/sqlc/main.go:10 +0x7a\r\n```\r\n\r\n\r\n### Database schema\r\n\r\n```sql\r\n-- Example queries for sqlc\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\nCREATE OR REPLACE FUNCTION add_author (name text, bio text, out id int)\r\nAS $$\r\nDECLARE\r\nBEGIN\r\n  id = 123;\r\nEND;\r\n$$ LANGUAGE plpgsql;\r\n```\r\n\r\n\r\n### SQL queries\r\n\r\n```sql\r\n-- name: CreateAuthor :one\r\nSELECT * FROM add_author (\r\n  sqlc.arg(name), sqlc.arg(bio)\r\n);\r\n```\r\n\r\n\r\n### Configuration\r\n\r\n```yaml\r\n{\r\n  \"version\": \"1\",\r\n  \"packages\": [\r\n    {\r\n      \"path\": \"db\",\r\n      \"engine\": \"postgresql\",\r\n      \"schema\": \"query.sql\",\r\n      \"queries\": \"query.sql\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/a6294fc50b0b186b26f9ff70895aefec3fc9f2e19390bcf81e91021aacde0231\r\n\r\n### What operating system are you using?\r\n\r\nLinux\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/danielbprice","@type":"Person","name":"danielbprice"},"datePublished":"2022-05-31T17:07:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1654/sqlc/issues/1654"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:67e7f74c-7db9-3fb2-2e66-7866c1a07f53
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8B4C:20A2E2:27B898:355171:6A51BA71
html-safe-noncee122878c47bf8f924c581672a6556d86c2c164c65a36ebbe950a74af1ddf56c0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjRDOjIwQTJFMjoyN0I4OTg6MzU1MTcxOjZBNTFCQTcxIiwidmlzaXRvcl9pZCI6IjQ5NTYxMzEwMDI4MDIwOTI2NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac351ad8e0fb2c38cc05ca184b9ddbbaa5b07fa0f34f01abda80b47cddb0fb96d6
hovercard-subject-tagissue:1254155298
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/1654/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8ee2f45e94a5287acb5a56eb32a8a624a54926c6c75fbf20df1cf48b5d89719d/sqlc-dev/sqlc/issues/1654
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8ee2f45e94a5287acb5a56eb32a8a624a54926c6c75fbf20df1cf48b5d89719d/sqlc-dev/sqlc/issues/1654
og:image:altVersion 1.13.0 What happened? I tried to call a function which has an OUT argument. I am seeing sqlc crash a lot when I try to do this. I realize I might have botched the syntax or something somewh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanielbprice
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git
octolytics-dimension-user_id136738596
octolytics-dimension-user_loginsqlc-dev
octolytics-dimension-repository_id193160679
octolytics-dimension-repository_nwosqlc-dev/sqlc
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193160679
octolytics-dimension-repository_network_root_nwosqlc-dev/sqlc
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/issues/1654#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fissues%2F1654
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fissues%2F1654
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/issues/1654
Reloadhttps://github.com/sqlc-dev/sqlc/issues/1654
Reloadhttps://github.com/sqlc-dev/sqlc/issues/1654
Please reload this pagehttps://github.com/sqlc-dev/sqlc/issues/1654
sqlc-dev https://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Notifications https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Fork 1.1k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Star 18k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Code https://github.com/sqlc-dev/sqlc
Issues 597 https://github.com/sqlc-dev/sqlc/issues
Pull requests 106 https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality 0 https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
Code https://github.com/sqlc-dev/sqlc
Issues https://github.com/sqlc-dev/sqlc/issues
Pull requests https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
#2865https://github.com/sqlc-dev/sqlc/pull/2865
sqlc crashes when calling a function with OUT arghttps://github.com/sqlc-dev/sqlc/issues/1654#top
#2865https://github.com/sqlc-dev/sqlc/pull/2865
📚 postgresqlhttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Abooks%3A%20postgresql%22
💻 linuxhttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Acomputer%3A%20linux%22
🔧 golanghttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Awrench%3A%20golang%22
bugSomething isn't workinghttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22bug%22
panichttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22panic%22
https://github.com/danielbprice
danielbpricehttps://github.com/danielbprice
on May 31, 2022https://github.com/sqlc-dev/sqlc/issues/1654#issue-1254155298
https://play.sqlc.dev/p/a6294fc50b0b186b26f9ff70895aefec3fc9f2e19390bcf81e91021aacde0231https://play.sqlc.dev/p/a6294fc50b0b186b26f9ff70895aefec3fc9f2e19390bcf81e91021aacde0231
📚 postgresqlhttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Abooks%3A%20postgresql%22
💻 linuxhttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Acomputer%3A%20linux%22
🔧 golanghttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22%3Awrench%3A%20golang%22
bugSomething isn't workinghttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22bug%22
panichttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22panic%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.