supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

danrasmuson opened this issue · comments

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.

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

Closing in favor of #393