Skip to content

nullslast/nullsfirst not working on GET with pagination (offset/limit) #4109

@ChristianBisig1

Description

@ChristianBisig1

Environment

  • PostgreSQL version: PostgreSQL 14.17
  • PostgREST version: v13.0.0

Description of issue

After upgrading to PostgREST v13.0.0 GET requests that use both order=...nullsfirst/nullslast in combination with offset= and limit= return BadRequest responses. The same requests used to work as expected in version v12.2.12.

Example Request on a local setup using (https://github.com/mattddowney/compose-postgrest)

http://localhost:3000/country?order=headofstate.desc.nullslast&limit=10
{ "code": "42601", "details": null, "hint": null, "message": "syntax error at or near \"NULLS\"" }

Without either the .nullslast part or the limit= part the request returns the expected result.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions