Open kevinschaich opened 1 year ago
Linking https://github.com/PostgREST/postgrest/issues/2125.
If the URL exceeds a certain length, this should be submitted as a POST request instead, with the IDs in the body of the request
Planning to use the HTTP SEARCH method instead.
For now you can workaround this with rpc() as described here, example here.
I have the same issue.
const response = await supabase
.from('team_profile')
.select('id, team_id, profile!inner( identifier )')
.in('profile.identifier', identifiers)
.eq('team_id', teamId);
if identifiers are too many, or if they are too long, this will triggers Error: URI too long
.
Because this code generate a get request, and it exceeds the maximum URI Length accepted by the server.
Seeing this on the flutter web side.
Same here, I have to batch my updates in order to avoid this issue which is pretty annoying.
Seeing this issue too when attempting to query 1000 entries
Issue happening over here on Flutter also when querying more than 200 GUIDs using IN filter.
const response = await supabase
.from('products')
.select('*, supplier(*)')
.not('id', 'in', excludingIds)
....
As a side-problem, with RPC (without the Supabase magic) can't seem to find a way to easily obtain joined tables (e.g. supplier) like we do with .select('*, supplier(*)')
. If you have any suggestions on how this is done without breaking the standard let me know.
Would like to receive an update on this as it is quite annoying not having the code in one place. Thank you.
@rovercoder If your RPC is defined as CREATE FUNCTION func ... RETURNS SETOF PRODUCTS
then you can use rpc(func).select('*, supplier(*)')
, the same as for tables.
I have the same issue. Is it possible to do a normal select query as a POST request?
Bug report
Describe the bug
GET request fails on large queries
To Reproduce
Run with more than ~10-15 object IDs and it fails because the URL becomes too long for a GET request.
Expected behavior
If the URL exceeds a certain length, this should be submitted as a POST request instead, with the IDs in the body of the request