[erlang-questions] Erlang & PostgreSQL native driver

Daniel Caune daniel.caune@REDACTED
Thu Nov 15 20:06:28 CET 2007


We are using Erlang, PostgreSQL 8.2.5, and the Erlang library pgsql
developed by Christian Sunesson

The Erlang library pgsql is easy to use and does the job so far, at
least for our prototyping phase.  However, this library has a problem
with stored function that returns nothing such as:

  RETURNS void
AS $$

The problem seems to happen when the Erlang library pgsql tries to
decode the result value return by the stored function, which is void.
The transaction has been successfully committed in database.

(u@REDACTED)3> pgsql:squery(Connection, "SELECT foo()").    
=ERROR REPORT==== 15-Nov-2007::11:40:25 ===
Error in process <0.38.0> on node 'u@REDACTED' with exit value:

** exited: {{nocatch,{unknown_oid,2278}},
             {pgsql_proto,idle,2}]} **

I don't think this is a big issue.  According to the error
(unknown_oid), I suppose that the pgsql library doesn't support void
type yet.  We should be able to fix easily the library.

However, because our prototyping phase is close to the end, we are
thinking to use another library that would perhaps better fit production
constraints (pool, etc.).  We have tested the PostgreSQL ODBC driver but
we have faced some issues on Windows (Unicode, PostgreSQL data type

We are interesting in having some feedback from people who use both
Erlang and PostgreSQL.  Which PostgreSQL driver do you use?  Does
someone use the PostgreSQL driver from Erlang Consulting?  Are there
other native PostgreSQL driver?


More information about the erlang-questions mailing list