You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I'd like to report some buggy 'content-range' value in the response header with aggregation function.
Minimal SQL definition
CREATE TABLE employees (
id SERIAL PRIMARY KEY,
organization_id INTEGER,
first_name VARCHAR,
last_name VARCHAR,
gender VARCHAR,
status VARCHAR
);
How I make a request to Postgrest: http:<postgrest_url>/employees?limit=100&offset=0&and=(or(status.like.active))&select=count(),gender
The behaviour I expect:
In the response header, "content-range" value should be '0-2/3'. There are only 3 gender values in DB: male, female, undisclosed.
The actual behaviour:
In the response header, "content-range" value is '0-2/147'.
I suspect the total number of record "147" is from the total number of records without aggregation.
When I make a request without aggregation; http:<postgrest_url>/employees?limit=100&offset=0&and=(or(status.like.active)) I have '0-99/147' as "content-range" value in the response header.
Thank you in advance!
The text was updated successfully, but these errors were encountered:
jeffoo713
changed the title
Issue: 'content-range' from response header buggy with aggregation function
Issue: 'content-range' from response header with aggregation function
Nov 21, 2024
Environment
Description of issue
Hi there, I'd like to report some buggy 'content-range' value in the response header with aggregation function.
http:<postgrest_url>/employees?limit=100&offset=0&and=(or(status.like.active))&select=count(),gender
In the response header, "content-range" value should be '0-2/3'. There are only 3 gender values in DB: male, female, undisclosed.
In the response header, "content-range" value is '0-2/147'.
I suspect the total number of record "147" is from the total number of records without aggregation.
When I make a request without aggregation;
http:<postgrest_url>/employees?limit=100&offset=0&and=(or(status.like.active))
I have '0-99/147' as "content-range" value in the response header.Thank you in advance!
The text was updated successfully, but these errors were encountered: