Erlang & PostgreSQL native driver

Поиск
Список
Период
Сортировка
От Daniel Caune
Тема Erlang & PostgreSQL native driver
Дата
Msg-id 1E293D3FF63A3740B10AD5AAD88535D20675195B@UBIMAIL1.ubisoft.org
обсуждение исходный текст
Список pgsql-sql
Hi,

We are using Erlang, PostgreSQL 8.2.5, and the Erlang library pgsql
developed by Christian Sunesson
(http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/pgsql/).


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:

CREATE OR REPLACE FUNCTION foo() 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@pc-dcaune)3> pgsql:squery(Connection, "SELECT foo()").
=ERROR REPORT==== 15-Nov-2007::11:40:25 ===
Error in process <0.38.0> on node 'u@pc-dcaune' with exit value:
{{nocatch,{unknown_oid,2278}},[{pgsql_util,decode_oid,1},{pgsql_util,dec
ode_descs,1},{pgsql_proto,process_squery,1},{pgsql_proto,idle,2}]}

** exited: {{nocatch,{unknown_oid,2278}},           [{pgsql_util,decode_oid,1},            {pgsql_util,decode_descs,1},
          {pgsql_proto,process_squery,1},            {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
support).

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?

Thanks,
--
Daniel


В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: trap for any exception
Следующее
От: Jean-David Beyer
Дата:
Сообщение: Re: Is there anything special about pg_dump's compression?