implementation of MARMOTTA-536 (BIND) and a large number of additional functions for postgres