Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use derived ArrayDims instead of deprecated attndims #3032

Merged
merged 1 commit into from
Dec 4, 2023
Merged

fix: Use derived ArrayDims instead of deprecated attndims #3032

merged 1 commit into from
Dec 4, 2023

Conversation

hendrikhofstadt
Copy link
Contributor

Postgres sometimes returns incorrect values for attndims which explains the TODO in the code. Use the type-derived dimensions instead.
This fixes a bug where in rare cases arrays were not correctly detected in one of our applications.

According to https://postgrespro.com/list/thread-id/2304332

We don't really care. attndims is a historical leftover and should never
be relied on for any semantically significant purpose.
TBH, my inclination would be to remove the column altogether rather than
"fix" this.

@kyleconroy kyleconroy merged commit 564f67d into sqlc-dev:main Dec 4, 2023
8 checks passed
@kyleconroy
Copy link
Collaborator

Thanks!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants