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

Daniel Kastl daniel at georepublic.de
Wed Oct 24 18:55:33 PDT 2018


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:
https://github.com/pgRouting/admin/wiki/RFC3#developers-steps-to-take

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.

CREATE OR REPLACE FUNCTION pgr_aStarCost(
    ---------------- 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,
Daniel






On Thu, Oct 25, 2018 at 3:44 AM Vicky Vergara <vicky at georepublic.de> wrote:

> Dear Users and developers
>
> We would like to hear your feedback about:
> Positional and named parameters on pgRouting functions
> That is described here:
> https://github.com/pgRouting/admin/wiki/RFC3
>
> 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.
>
> Regards
>
> The pgRouting team
>
>
>
>
> --
>
> Georepublic UG (haftungsbeschränkt)
> Salzmannstraße 44,
> 81739 München, Germany
>
> Vicky Vergara
> Operations Research
>
> eMail: vicky at georepublic.de
> Web: https://georepublic.info
>
> 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
> Pgrouting-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pgrouting-users



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: https://georepublic.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20181025/a29cab61/attachment.html>


More information about the Pgrouting-users mailing list