[pgrouting-dev] can not find the definition of the function

Jinfu Leng logicnut at gmail.com
Thu Jun 14 17:56:18 PDT 2012


Hey Daniel,

I checked every "cmakelists.txt", and updated accordingly. In addition, I
executed this
"CREATE OR REPLACE FUNCTION shortest_path_mild_two_q(sql text, source_id
integer,
        target_id integer, directed boolean, has_reverse_cost boolean)
        RETURNS SETOF path_result
        AS '$libdir/librouting'
        LANGUAGE 'C' IMMUTABLE STRICT;"
in pgadmin3 directly.

Right now it works.

Thanks,
Jinfu

On Thu, Jun 14, 2012 at 7:37 PM, Daniel Kastl <daniel at georepublic.de> wrote:

> Have you looked at the "CMakeLists.txt", which you can find in pretty much
> every directory?
>
> Daniel
>
>
> On Thu, Jun 14, 2012 at 1:21 PM, Jinfu Leng <logicnut at gmail.com> wrote:
>
>> Hello Jay,
>>
>> Thanks very much.
>>
>> You need to create a .sql file and write function definition.
>> I did not know how to create the .sql file. I added the definition of the
>> function:
>>
>> CREATE OR REPLACE FUNCTION shortest_path_mild_two_q(sql text, source_id
>> integer,
>>         target_id integer, directed boolean, has_reverse_cost boolean)
>>         RETURNS SETOF path_result
>>         AS '$libdir/librouting'
>>         LANGUAGE 'C' IMMUTABLE STRICT;
>>
>> to the file "rounting_core.sql".
>>
>> Modify cmakelists accordingly.
>> Which cmakelists.txt file are you referring to? I updated the
>> cmakelists.txt file in the folder "core/src".
>>
>> It is not working right now.
>>
>> Jinfu
>>
>>
>> On Thu, Jun 14, 2012 at 11:32 AM, Jay Mahadeokar <
>> jai.mahadeokar at gmail.com> wrote:
>>
>>> Hi Jinfu,
>>> It seems that your function is not created in postgres database. You
>>> need to create a .sql file and write function definition. Modify cmakelists
>>> accordingly.
>>> If you have already done that, and didn't work, try adding it by giving
>>> the command at sql prompt.   Check out the documentation in apsp page in
>>> pgrouting wiki for exact commands.
>>> On 14 Jun 2012 07:52, "Jinfu Leng" <logicnut at gmail.com> wrote:
>>>
>>>>  Hey,
>>>>
>>>> I am writing the code for the new algorithm. I added the name of the
>>>> file to the file "CMakeLists.txt", and then the file can be compiled. In
>>>> pgAdmin3, I can call the function shortest_path(), but when I tried to call
>>>> my function shortest_path_mild_two_q(), I got the error message "no matched
>>>> function".
>>>>
>>>> My question is, besides "CMakeLists.txt", what else should I do to let
>>>> the system know there is a function named shortest_path_mild_two_q().
>>>>
>>>> Thanks,
>>>> Jinfu
>>>>
>>>> _______________________________________________
>>>> pgrouting-dev mailing list
>>>> pgrouting-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>>>
>>>>
>>> _______________________________________________
>>> pgrouting-dev mailing list
>>> pgrouting-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>>
>>>
>>
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>>
>
>
> --
> Georepublic UG & Georepublic Japan
> eMail: daniel.kastl at georepublic.de
> Web: http://georepublic.de
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20120615/09e56dd3/attachment.html>


More information about the pgrouting-dev mailing list