I'm trying to replicate a function that a former employee built within Postgres in another language and having trouble working out what the # operator does. I've run a few numbers through it and there doesn't seem to be any consistency in the results:
select 1 # 1 --0
,1 # 2 --3
,1 # 3 --2
,1 # 4 --5
,1 # 5 --4
,2 # 2 --0
,2 # 3 --1
,2 # 4 --6
If anyone is able to explain I would be hugely grateful!