Error opening Postgres db for report

Stefano Boccanera <[email protected]> Fri, 27 May 2011 13:13:53 +0200
Newsgroups gmane.text.rlib.user
Message-ID <[email protected]>
--===============4364711012348915101==
Content-Type: multipart/alternative; boundary=0015174947147599dd04a44008b6

--0015174947147599dd04a44008b6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

hi guys

I trying to use Rlib for generating report against a postgres db.
I generated the xml report file from an example, written down a perl
procedure using the examples (perl and php) but when
I execute the procedure I got following error :

Setting locale to
[LC_CTYPE=3Dit_IT.UTF-8;LC_NUMERIC=3DC;LC_TIME=3Dit_IT.UTF-8;LC_COLLATE=3Di=
t_IT.UTF-8;LC_MONETARY=3Dit_IT.UTF-8;LC_MESSAGES=3Dit_IT.UTF-8;LC_PAPER=3Di=
t_IT.UTF-8;LC_NAME=3Dit_IT.UTF-8;LC_ADDRESS=3Dit_IT.UTF-8;LC_TELEPHONE=3Dit=
_IT.UTF-8;LC_MEASUREMENT=3Dit_IT.UTF-8;LC_IDENTIFICATION=3Dit_IT.UTF-8]
FAILED
encoding is NULL or invalid [C]... using en_US
 *( why rlib has failed to set the locale ? using locale dialect is very
important for us where all text into db are UTF-8)*

Could Not Load POSTGRES Input [/usr/local/lib/libr-postgres.so: undefined
symbol: g_free] *
( I checked into the path and the library exist, now we using postgersql
vesrione 9.0)*
rlib_add_query_as: Could not find input source [otrsprova]!
Error.. datasource [otrsprova] does not exist
No queries added to report

Following the test perl procedure :

#!/usr/bin/perl -w
    use rlib ;
    $PgConnect=3D"host=3Dlocalhost dbname=3Dotrs user=3Dotrs password=3D' '=
 ";
    $r =3D rlib::rlib_init();
    rlib::rlib_add_datasource_postgres($r, "otrsprova", $PgConnect);
    rlib::rlib_add_query_as($r, "otrsprova", "select id, name from
general_catalog", "gencat");
    rlib::rlib_set_locale($r, "it_IT");
    rlib::rlib_set_datasource_encoding($r, "otrsprova", "UTF-8");
    rlib::rlib_set_output_encoding($r, "UTF-8");
    rlib::rlib_add_report($r, "provaotrs.xml");
    rlib::rlib_set_output_format_from_text($r, "TXT");
    rlib::rlib_execute($r);
    rlib::rlib_spool($r);
    rlib::rlib_free($r);
    exit 0;

Using Rlib would resolve some limitations we have using other package, hope
you would help me.

best regards

--=20
 *
Stefano Boccanera*

--0015174947147599dd04a44008b6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<font size=3D"4">hi guys </font><br><br><font size=3D"4">I trying to use Rl=
ib for generating report against a postgres db. <br>I generated the xml rep=
ort file from an example, written down a perl procedure using the examples =
(perl and php) but when <br>
I execute the procedure I got following error :<br><br><span style=3D"backg=
round-color: rgb(255, 255, 153);">Setting locale to [LC_CTYPE=3Dit_IT.UTF-8=
;LC_NUMERIC=3DC;LC_TIME=3Dit_IT.UTF-8;LC_COLLATE=3Dit_IT.UTF-8;LC_MONETARY=
=3Dit_IT.UTF-8;LC_MESSAGES=3Dit_IT.UTF-8;LC_PAPER=3Dit_IT.UTF-8;LC_NAME=3Di=
t_IT.UTF-8;LC_ADDRESS=3Dit_IT.UTF-8;LC_TELEPHONE=3Dit_IT.UTF-8;LC_MEASUREME=
NT=3Dit_IT.UTF-8;LC_IDENTIFICATION=3Dit_IT.UTF-8] FAILED</span><br style=3D=
"background-color: rgb(255, 255, 153);">
<span style=3D"background-color: rgb(255, 255, 153);">encoding is NULL or i=
nvalid [C]... using en_US</span> <br>=C2=A0<b>( why rlib has failed to set =
the locale ? using locale dialect is very important for us where all text i=
nto db are UTF-8)</b><br>
<br><span style=3D"background-color: rgb(255, 255, 153);">Could Not Load PO=
STGRES Input [/usr/local/lib/libr-postgres.so: undefined symbol: g_free] <b=
><span style=3D"background-color: rgb(255, 255, 255);"><br>( I checked into=
 the path and the library exist, now we using postgersql vesrione 9.0)</spa=
n></b></span><br style=3D"background-color: rgb(255, 255, 153);">
<span style=3D"background-color: rgb(255, 255, 153);">rlib_add_query_as: Co=
uld not find input source [otrsprova]!</span><br style=3D"background-color:=
 rgb(255, 255, 153);"><span style=3D"background-color: rgb(255, 255, 153);"=
>Error.. datasource [otrsprova] does not exist</span><br style=3D"backgroun=
d-color: rgb(255, 255, 153);">
<span style=3D"background-color: rgb(255, 255, 153);">No queries added to r=
eport</span><br><br>Following the test perl procedure : </font><br><br><fon=
t size=3D"4">#!/usr/bin/perl -w<br>=C2=A0=C2=A0=C2=A0 use rlib ;<br>=C2=A0=
=C2=A0=C2=A0 $PgConnect=3D&quot;host=3Dlocalhost dbname=3Dotrs user=3Dotrs =
password=3D&#39; &#39; &quot;;<br>
=C2=A0=C2=A0=C2=A0 $r =3D rlib::rlib_init();<br>=C2=A0=C2=A0=C2=A0 rlib::rl=
ib_add_datasource_postgres($r, &quot;otrsprova&quot;, $PgConnect);<br>=C2=
=A0=C2=A0=C2=A0 rlib::rlib_add_query_as($r, &quot;otrsprova&quot;, &quot;se=
lect id, name from general_catalog&quot;, &quot;gencat&quot;);<br>
=C2=A0=C2=A0=C2=A0 rlib::rlib_set_locale($r, &quot;it_IT&quot;);<br>=C2=A0=
=C2=A0=C2=A0 rlib::rlib_set_datasource_encoding($r, &quot;otrsprova&quot;, =
&quot;UTF-8&quot;);<br>=C2=A0=C2=A0=C2=A0 rlib::rlib_set_output_encoding($r=
, &quot;UTF-8&quot;);<br>=C2=A0=C2=A0=C2=A0 rlib::rlib_add_report($r, &quot=
;provaotrs.xml&quot;);<br>
=C2=A0=C2=A0=C2=A0 rlib::rlib_set_output_format_from_text($r, &quot;TXT&quo=
t;);<br>=C2=A0=C2=A0=C2=A0 rlib::rlib_execute($r);<br>=C2=A0=C2=A0=C2=A0 rl=
ib::rlib_spool($r);<br>=C2=A0=C2=A0=C2=A0 rlib::rlib_free($r);<br>=C2=A0=C2=
=A0=C2=A0 exit 0;<br><br>Using Rlib would resolve some limitations we have =
using other package, hope you would help me.<br>
<br>best regards<br></font><br>-- <br><div style=3D"font-family: verdana,sa=
ns-serif;">=C2=A0<b><i><br><font size=3D"4">Stefano Boccanera</font></i></b=
></div>
<br>

--0015174947147599dd04a44008b6--


--===============4364711012348915101==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
--===============4364711012348915101==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Rlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rlib-users

--===============4364711012348915101==--