Calling .limit() twice on one chain sends both values:
client.from_("t").select("*").limit(10).limit(20)
# sends: select=*&limit=10&limit=20
Same for .offset() and .range(). On current main these use params.add() while order() uses params.set() and merges, so this looks like an oversight.
Concrete problem: against local PostgREST 16.2 the server applies the last value (20 wins), but params["limit"] on the built request returns the first (10). The client disagrees with the server about what the query is.
Note this differs from #1208, which is about reusing a builder across executes. This is setter semantics in a single chain. Foreign-table variants share the same .add path.
Calling
.limit()twice on one chain sends both values:Same for
.offset()and.range(). On current main these useparams.add()whileorder()usesparams.set()and merges, so this looks like an oversight.Concrete problem: against local PostgREST 16.2 the server applies the last value (20 wins), but
params["limit"]on the built request returns the first (10). The client disagrees with the server about what the query is.Note this differs from #1208, which is about reusing a builder across executes. This is setter semantics in a single chain. Foreign-table variants share the same
.addpath.