replacer for erlang's pg2