From https://github.com/pgRouting/pgrouting/pull/2868#discussion_r2059365130 **`edges_sql` should be `const char *`** And all other queries that are passed. The function never mutates the string literal pointed to by `edges_sql`, yet the parameter is declared `char *`. Changing to `const char*`: ```diff - char *edges_sql, + const char *edges_sql, ``` makes intent explicit and prevents accidental writes in future edits.