Comments (2)
I don't think the proposed solution will work for OFFSET
, because offset will be applied twice:
- Once inside your function
- Once outside the function by PostgREST directly.
This is not a problem for LIMIT, but with OFFSET it is.
The simplest solution I can think of is to just add my_limit
and my_offset
arguments to your RPC and then change your query respectively. Those will then only be applied inside your function.
from postgrest.
Thanks for your reply, but since we need to kinda have the limit/offset (compatible with native postgrest filters as they're exposed as is), the name of URL params themselves need to align.
But thinking for solution on similar lines, I am thinking maybe an extension of that workaround could be to strip off those parameters from URL itself (at reverse proxy before passing to postgrest) and convert limit/offset params to be handled internally - as this can be combed with ACLs to apply on specific endpoints where we do need to optimize the default pagination, accordingly - closing this.
from postgrest.
Related Issues (20)
- Wrong `503 Service Unavailable` on pg `53400` HOT 1
- Dependency Dashboard
- Clarify that domain representations need implicit casts
- Domain representations for RPC
- Static executables on other platforms: Native builds via Nix
- Static executables on other platforms: Cross compilation via Nix
- Selecting a related object modified by an `AFTER INSERT TRIGGER` does not show the inserted data HOT 4
- Hard to upgrade from `v9.0.1` HOT 8
- A "match" pattern inside an "or()" construct cannot contain parens HOT 2
- Cannot select field from inherited table HOT 2
- Channel retrying message doesn't doesn't follow log format HOT 3
- Responses are slow when the schema cache reloads HOT 3
- Stack Overflow error in dev enviroment when table and embed resource do not exist HOT 8
- Admin server `/ready` endpoint is incorrect on slow schema cache loads
- `pgrst.server_trace_header` in-database config not working HOT 1
- Filtering With Or Logical Operator on Embedded Resources Inconsistent Behavior
- Postgrest Server Does'nt respond for DB error SQL Error [57014]: ERROR: canceling statement due to statement timeout .
- Inserts and Updates now require an up-to-date schema cache HOT 2
- Building static executables directly via nix' `pkgsStatic.postgrest`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgrest.