Title: Duplication of fields when generating for pgx/v5 · Issue #3080 · sqlc-dev/sqlc · GitHub
Open Graph Title: Duplication of fields when generating for pgx/v5 · Issue #3080 · sqlc-dev/sqlc
X Title: Duplication of fields when generating for pgx/v5 · Issue #3080 · sqlc-dev/sqlc
Description: Version 1.24.0 What happened? Multiple fields with the same name are generated It will work correctly if you use enumerations ($1, $2, etc.) or sqlc.arg(number) Relevant log output type UpdateParams struct { Number int32 ID int32 Number ...
Open Graph Description: Version 1.24.0 What happened? Multiple fields with the same name are generated It will work correctly if you use enumerations ($1, $2, etc.) or sqlc.arg(number) Relevant log output type UpdateParam...
X Description: Version 1.24.0 What happened? Multiple fields with the same name are generated It will work correctly if you use enumerations ($1, $2, etc.) or sqlc.arg(number) Relevant log output type UpdateParam...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3080
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplication of fields when generating for pgx/v5","articleBody":"### Version\n\n1.24.0\n\n### What happened?\n\nMultiple fields with the same name are generated\r\n\r\n_It will work correctly if you use enumerations ($1, $2, etc.) or sqlc.arg(number)_\n\n### Relevant log output\n\n```shell\ntype UpdateParams struct {\r\n\tNumber int32\r\n\tID int32\r\n\tNumber int32\r\n}\n```\n\n\n### Database schema\n\n```sql\nCREATE TABLE public.demo (\r\n id INT PRIMARY KEY,\r\n number integer NOT NULL\r\n);\n```\n\n\n### SQL queries\n\n```sql\n-- name: Update :one\r\nUPDATE demo\r\nSET number = @number\r\nWHERE id = @id\r\n\tAND number = @number - 1\r\nRETURNING true AS updated;\n```\n\n\n### Configuration\n\n```yaml\n{\r\n \"version\": \"2\",\r\n \"sql\": [{\r\n \"schema\": \"schema.sql\",\r\n \"queries\": \"query.sql\",\r\n \"engine\": \"postgresql\",\r\n \"gen\": {\r\n \"go\": {\r\n \"out\": \"db\",\r\n \"sql_package\": \"pgx/v5\"\r\n }\r\n }\r\n }]\r\n}\n```\n\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/bc917ef4b923f377b2843a77398b3245df8b2c95b8330d1dffd015d4cd355c84\n\n### What operating system are you using?\n\nmacOS\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/AlexanderMint","@type":"Person","name":"AlexanderMint"},"datePublished":"2023-12-26T01:28:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3080/sqlc/issues/3080"}
| 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:035cb78d-54d4-f2a9-4f08-ab477370f4ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE5A:27E2F7:736826:9A51CE:6A5304D9 |
| html-safe-nonce | db1d49e7858512153c5017221f4bc97b9c8b6f2c71a966d3384b0b9179f97996 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTVBOjI3RTJGNzo3MzY4MjY6OUE1MUNFOjZBNTMwNEQ5IiwidmlzaXRvcl9pZCI6IjM1NjEyOTQ0OTg4ODA0ODg2NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b59943acd33b2a7c18b3fdad15652fdb2cefc7a3d8149427495cd800b8a47fab |
| hovercard-subject-tag | issue:2055944273 |
| 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/3080/issue_layout |
| twitter:image | https://opengraph.githubassets.com/754825cc0b5ef5371ba2d88d9c4fa7fe706aaa523038facb5d2e4e436809b901/sqlc-dev/sqlc/issues/3080 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/754825cc0b5ef5371ba2d88d9c4fa7fe706aaa523038facb5d2e4e436809b901/sqlc-dev/sqlc/issues/3080 |
| og:image:alt | Version 1.24.0 What happened? Multiple fields with the same name are generated It will work correctly if you use enumerations ($1, $2, etc.) or sqlc.arg(number) Relevant log output type UpdateParam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexanderMint |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width