<div dir="ltr"><p>Does anybody use pgsql:prepare() function from pgsql driver with latest PostgreSQL 8.3.3?</p><p>I tried with both of jungerl and ejabberd-modules versions and have the following issue:</p><p>I have the following simple table:<br>
</p><p>CREATE TABLE foo (<br>    bar    int<br>);</p>And this code:<br><p>% -------------------------------------------------<br></p><p>test_pgsql() -><br>    {ok, Db} = pgsql:connect("localhost", "test", "test", ""),<br>
<br>    pgsql:prepare(Db, add_example, "INSERT INTO foo (bar) VALUES ($1::int4)"), % <- CRASH occured at this call!<br>    pgsql:execute(Db, add_example, [1, 2]),<br><br>    pgsql:terminate(Db).</p><p>% -------------------------------------------------</p>
<p>When pgsql:prepare() is called I get (in ejabberd-modules edition) the following error message: <a href="http://pastebin.com/f1b777cd">http://pastebin.com/f1b777cd</a></p><p>I tried to ommit "::int4" suffix - this didn't help.<br>
</p><p>squery() and pquery() work fine.</p><p><br></p><p>Thanks.</p><p><br></p><p>--</p><p>Sergey<br></p><p></p><p></p></div>