Hello,
The following query returns "ZBC AA" when executed against Postgres:
select ?s where {
bind(replace(
'ABC AA', 'A', 'Z'
) as ?s)
}
It matches only the first 'A' in the string "ABC AA". The replace function in SPARQL will replace all of them.
The same query returns "ZBC ZZ" against H2 database. I can see that in Postgres there are two types of replace functions - REPLACE that replaces all of the matches and REGEXP_REPLACE that changes only the first match and my assumption is that the replace is translated to REGEXP_REPLACE.
Is that the expected behavior or is it a bug that needs to be fixed?
Kind regards,
Vasil