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

sqlutil.FrameFromRows: multiple results sets with different columns fail #827

Open
gabor opened this issue Dec 4, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@gabor
Copy link
Contributor

gabor commented Dec 4, 2023

try to run this query in postgres (may work in other databases too):

select 41; select 42 as A, 43 as B;

and call sqlutil.FrameFromRows on the result.

it fails with the error message: sql: expected 1 destination arguments in Scan, not 2

the PR #735 added support for handling multiple result sets, but it only works fine if every result-set has the same columns.

i'm not sure what the best solution would be:

  • return multiple frames in this case (needs change to the API, currently it returns a single frame)
  • behave as currently, but detect this problem and return a better error message
  • something else
@gabor gabor added the bug Something isn't working label Dec 4, 2023
@academo academo added enhancement New feature or request and removed bug Something isn't working labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants