Skip to content

[develop] pgr_drivingDistance: negative distance raises error #3093

@sakirr05

Description

@sakirr05

This is the companion to #3091 same tests, but on develop (4.1.0-dev)

I observed that negative distance now properly fails instead of silently returning nothing like on main. Tested on PostgreSQL 17.9,
Ubuntu 24.04.

distance = -1.0:

Image

multi-source with distance = -1.0:

Image

The part I wasn't sure about is distance = 0. It still quietly
returns just the origin node on both branches, no error, no warning.

distance = 0.0:

Image

Is that intentional? Mathematically it makes sense (you can only
reach yourself with zero distance), but it feels inconsistent if negative values now raise an error while zero doesn't.

Before I update any docs I wanted to check:
Should distance = 0 stay valid, or get rejected alongside negatives?
Is `XX000 the final error code or still being decided?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions