Re: [pgrouting-dev] [pgrouting-users] RFC3 Positional and named parameters on pgRouting functions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [pgrouting-dev] [pgrouting-users] RFC3 Positional and named parameters on pgRouting functions

Hi Vicky,

I agree with your proposal.

There is maybe one point, which we would loose, when we remove the names on compulsory parameter: code readability.

Take your example:

Now it's not so easy anymore to understand the first three input parameters, so I would suggest to somehow encourage developers (or make it a required formal rule) to append the parameter name in each line as a comment.

    ---------------- remove the names on compulsory parameters
    TEXT,    # edges_sql (required)
    BIGINT,  # start_vid (required)
    BIGINT,  # end_vid (required)
    directed BOOLEAN DEFAULT true,

I understand, that PostgreSQL does not allow us to use the same attribute name twice for in IN and OUT parameters, if we want to use named parameters. But isn't this something that could be solved in future versions of PostgreSQL? Looks more like a bug than a feature, because why would someone want to use the parameter name of one, that is defined as "OUT"?

Best regards,

On Thu, Oct 25, 2018 at 3:44 AM Vicky Vergara <[hidden email]> wrote:
Dear Users and developers

We would like to hear your feedback about:
Positional and named parameters on pgRouting functions
That is described here:

The aim is to enforce positional notation on compulsory parameters and allow named notation on optional parameters
That enforcement would take place on version 3.0.0 scheduled to be released on September 2019.

We will appreciate your feedback.


The pgRouting team

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research


Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

Pgrouting-users mailing list
[hidden email]

Georepublic UG & Georepublic Japan
eMail: [hidden email]

pgrouting-dev mailing list
[hidden email]