[erlang-questions] trouble with postgresql driver

Valentin Micic valentin@REDACTED
Fri Feb 9 07:51:36 CET 2007


Not that I have any experience with the driver, however:
Just try binary_to_list function, however eliminate non-printable characters, like 0 (mind you this looks like array of C-Strings):

instead of:
binary_to_list( <<99,108,105,101,110,116,95,101,110,99,111,100,105,110,103,0,85,84,70,56,0>>)
do:
binary_to_list( <<99,108,105,101,110,116,95,101,110,99,111,100,105,110,103,85,84,70,56>>)

and you'll get: "client_encodingUTF8"

conversely: 
binary_to_list( <<68,97,116,101,83,116,121,108,101,73,83,79,44,32,77,68,89>>

produce:

"DateStyleISO, MDY"

This looks to me like driver's environment.

V.
  ----- Original Message ----- 
  From: Roberto Saccon 
  To: erlang-questions 
  Sent: Friday, February 09, 2007 8:16 AM
  Subject: [erlang-questions] trouble with postgresql driver


  Is anybody using the posgres driver ( http://erlang-consulting.com/aboutus/opensource.html ) from erlang-consulting ? Couldn't find any documentation / examples and when I try to start the driver I get human-unreadable messages, see below: 

  5> application:start(psql).
  ok
  6> Event: {psql,parameter_status,
               <<99,108,105,101,110,116,95,101,110,99,111,100,105,110,103,0,85,84,70,56,0>>}
  Event: {psql,parameter_status, 
               <<68,97,116,101,83,116,121,108,101,0,73,83,79,44,32,77,68,89,0>>}
  Event: {psql,parameter_status,
               <<105,110,116,101,103,101,114,95,100,97,116,101,116,105,109,101,115,0,111,110,0>>} 
  Event: {psql,parameter_status,
               <<105,115,95,115,117,112,101,114,117,115,101,114,0,111,102,102,0>>}
  Event: {psql,parameter_status,
               <<115,101,114,118,101,114,95,101,110,99,111,100,105,110,103,0,85,84,70,56,0>>} 
  Event: {psql,parameter_status,
               <<115,101,114,118,101,114,95,118,101,114,115,105,111,110,0,56,46,49,46,52,0>>}
  Event: {psql,parameter_status,
               <<115,101,115,115,105,111,110,95,97,117,116,104,111,114,105,122,97,116,105,111,110,0,114,115,97,99,99,111,110,0>>} 
  Event: {psql,parameter_status,
               <<115,116,97,110,100,97,114,100,95,99,111,110,102,111,114,109,105,110,103,95,115,116,114,105,110,103,115,0,111,102,102,0>>}
  Event: {psql,parameter_status,
               <<84,105,109,101,90,111,110,101,0,65,109,101,114,105,99,97,47,70,111,114,116,97,108,101,122,97,0>>} 
  Event: {psql,backend_key_data,<<0,0,77,165,116,138,156,44>>}



  and any attempt to execute a query sql:q/1 results in the following error: 

  ** exited: {noproc,{gen_server,call,
                                 [sql_pool_mgr_srv,
                                  {reference,<0.347.0>,default}]}} **

  With the same authorization credentials, but different (non-erlang) client app I can connect to the db. 
  Does anybody know how to interpret this error messages and get this driver to work ?

  -- 
  Roberto Saccon 


------------------------------------------------------------------------------


  _______________________________________________
  erlang-questions mailing list
  erlang-questions@REDACTED
  http://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070209/7875b88b/attachment.htm>


More information about the erlang-questions mailing list