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)
- Improve readability of Curl examples with many query parameters
- Query parameters that aren't filters on a POST request shouldn't return 400 HOT 4
- Any experience proxyng rpc with node http-proxy-middleware?
- for HTTP POST stored procedures (/rpc) ignores schema HOT 1
- "threads.c" error when running binaries or docker image for amd64 devel version HOT 18
- Migrate the CI Arm64 Build to the new GitHub Arm-based Linux runners (when available) HOT 2
- Bypass `db-max-rows` for RPC HOT 1
- PostGIS geometry returned as binary in text/csv output when WKT would be expected HOT 3
- Returning generated SQL HOT 2
- postgrest-release needs to bump the docs version
- Fix error logs when the listener connects to a read replica
- Table-valued or composite types parameters for rpc functions HOT 4
- Support encrypted JWT in addition to signed JWT
- Improve error messages for JWT verification errors HOT 1
- Return 401 for JWT with invalid role
- Return 404 on none existing endpoint with resource embedding
- Re-implement minimal length for jwt-secret
- Use the filters in POST requests for UPSERTS
- Transient `SSL SYSCALL error: EOF detected` HOT 1
- Many-To-Many join fails when a view in another exposed schema has the same name as a table in the target schema HOT 2
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.