Skip to content

[main] pgr_drivingDistance accepts negative distance without raising an error #3091

@sakirr05

Description

@sakirr05

While testing pgr_drivingDistance before updating the docs, I noticed that passing a negative distance doesn't raise an error — it just returns zero rows with a NOTICE. That's indistinguishable from a valid empty result.

pgRouting 4.0.1 | PostgreSQL 14.22 | Ubuntu 22.04

distance = -1.0 -> silent empty result:

Image

distance = 0.0 -> returns origin node only:

Image

Interestingly, on develop (4.1.0-dev) the same query raises:
ERROR: Negative value found on 'distance Must be positive

Note: I used claude's AI assistance to help structure the testing process

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions