Note that there are some explanatory texts on larger screens.

plurals
  1. POErlang and PostgreSQL
    primarykey
    data
    text
    <p>I try to execute simple PostgreSQL query with erlang and epgsql.</p> <p>I do:</p> <pre><code>{ok, C} = pgsql:connect("localhost", "shk", "qwerty", [{database, "mydb"}]). &gt;&gt; {ok,&lt;0.34.0&gt;} </code></pre> <p>Then:</p> <pre><code>{ok, Cols, Rows} = pgsql:squery(C, "select * from users"). </code></pre> <p>But i got error:</p> <pre><code>=ERROR REPORT==== 27-Apr-2012::17:58:23 === ** State machine &lt;0.34.0&gt; terminating ** Last message in was {'EXIT',&lt;0.32.0&gt;, {{badmatch, {error, {error,'ð\236ð¨ð\230ð\221ð\232ð\220',&lt;&lt;"42P01"&gt;&gt;, &lt;&lt;208,190,209,130,208,189,208,190,209,136,208,181, 208,189,208,184,208,181,32,34,109,121,100,98,34, 32,208,189,208,181,32,209,129,209,131,209,137, 208,181,209,129,209,130,208,178,209,131,208,181, 209,130&gt;&gt;, [{position,&lt;&lt;"15"&gt;&gt;}]}}}, [{erl_eval,expr,3}]}} ** When State == ready ** Data == {state,undefined,&lt;0.35.0&gt;,5000, [{&lt;&lt;"application_name"&gt;&gt;,&lt;&lt;&gt;&gt;}, {&lt;&lt;"client_encoding"&gt;&gt;,&lt;&lt;"UTF8"&gt;&gt;}, {&lt;&lt;"DateStyle"&gt;&gt;,&lt;&lt;"ISO, DMY"&gt;&gt;}, {&lt;&lt;"integer_datetimes"&gt;&gt;,&lt;&lt;"on"&gt;&gt;}, {&lt;&lt;"IntervalStyle"&gt;&gt;,&lt;&lt;"postgres"&gt;&gt;}, {&lt;&lt;"is_superuser"&gt;&gt;,&lt;&lt;"off"&gt;&gt;}, {&lt;&lt;"server_encoding"&gt;&gt;,&lt;&lt;"UTF8"&gt;&gt;}, {&lt;&lt;"server_version"&gt;&gt;,&lt;&lt;"9.0.7"&gt;&gt;}, {&lt;&lt;"session_authorization"&gt;&gt;,&lt;&lt;"shk"&gt;&gt;}, {&lt;&lt;"standard_conforming_strings"&gt;&gt;,&lt;&lt;"off"&gt;&gt;}, {&lt;&lt;"TimeZone"&gt;&gt;,&lt;&lt;"posixrules"&gt;&gt;}], undefined,undefined,undefined, {30932,488494147}, {statement,undefined,undefined,undefined}, 73} ** Reason for termination = ** {{badmatch,{error,{error,'ð\236ð¨ð\230ð\221ð\232ð\220',&lt;&lt;"42P01"&gt;&gt;, &lt;&lt;208,190,209,130,208,189,208,190,209,136,208,181, 208,189,208,184,208,181,32,34,109,121,100,98,34, 32,208,189,208,181,32,209,129,209,131,209,137, 208,181,209,129,209,130,208,178,209,131,208,181, 209,130&gt;&gt;, [{position,&lt;&lt;"15"&gt;&gt;}]}}}, [{erl_eval,expr,3}]} </code></pre> <p>What's wrong i do? How can i fix it?</p> <p>Thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload