PgRouting/pgr_dijkstra: How to log output, i.e raising a notice message after every 100, 500, 0r 1.000 calculated routes or so. #2339
-
I am writing a code PL/pgSQL that processes both input layers (households[points] and network[linestrings]). ExpectationThe processing should produce an output layer with all routes/connections from every household to every other household. Given an input layer with around 1.000 (n) households the resulting routes/connections layer should have around 1.000.000 routes/connections (n * n). ProblemI want the procedure to produce some logging output, i.e raising a notice message after every 1.000 calculated routes or so. Sample Data
Platform/versions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
What is been asked forIt can not be done due to the way postgres function works:
So when a So if seq represents the i'th call, then before the first row everything is calculated
I am not saying that this is impossible, but what comes to my mind, the code that would need to be modified first is postgresSQL's, like have an What I think it is needed
Then (In pseudo code):
|
Beta Was this translation helpful? Give feedback.
What is been asked for
It can not be done due to the way postgres function works:
https://www.postgresql.org/docs/current/xfunc-c.html#XFUNC-C-RETURN-SET
Basically what is says in pseudo code where pgRouting (nor any extension/function coded with C) does not have control over what the
SRF_
postgres macros.So when a
SELECT * FROM fn
id donef…