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

.in() filter maximum filter size receives "URI too long" error #423

Closed
danrasmuson opened this issue Apr 27, 2023 · 2 comments
Closed

.in() filter maximum filter size receives "URI too long" error #423

danrasmuson opened this issue Apr 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@danrasmuson
Copy link

Bug report

In the below query pdfIds.length is 800 items long. This causes the query to fail.

    supabase
      .from('pdfs')
      .select('*')
      .in('id', pdfIds)

The error is...

{ message: 'URI too long\n' }

Expected behavior

I would expect supabase to make use of the POST body of requests and not just append filters onto the URI. This would allow for these longer queries.

@danrasmuson danrasmuson added the bug Something isn't working label Apr 27, 2023
@steve-chavez steve-chavez transferred this issue from supabase/supabase-js Apr 27, 2023
@steve-chavez
Copy link
Member

Thanks for the report. For now as a workaround you can use an RPC. RPC uses POST, you can send an big array there and pass it to a SQL query(with col = ANY(<parameter>).

I would expect supabase to make use of the POST body of requests and not just append filters onto the URI.

Yes, we're planning to switch to the HTTP SEARCH method. This will be transparent to the supabase-js functions.

Related #292

@soedirgo
Copy link
Member

soedirgo commented May 8, 2023

Closing in favor of #393

@soedirgo soedirgo closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants