Erlang to PostgresSQL converter