Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 712449F9D99 for ; Thu, 16 Nov 2006 16:21:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 93887-10 for ; Thu, 16 Nov 2006 16:21:01 -0400 (AST) X-Greylist: delayed 00:30:42.749612 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3015B9F9EED for ; Thu, 16 Nov 2006 16:21:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from isb.com.pl (poczta.isb.com.pl [80.48.198.2]) by svr4.postgresql.org (Postfix) with ESMTP id 05A475AF039 for ; Thu, 16 Nov 2006 19:50:30 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by isb.com.pl (Postfix) with ESMTP id B8F7CB13B3 for ; Thu, 16 Nov 2006 20:53:35 +0100 (CET) Received: from isb.com.pl ([127.0.0.1]) by localhost (isb.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31801-03 for ; Thu, 16 Nov 2006 20:53:34 +0100 (CET) Received: from mail.isb.com.pl (localhost.localdomain [127.0.0.1]) by isb.com.pl (Postfix) with ESMTP id 61B93B13B1 for ; Thu, 16 Nov 2006 20:53:34 +0100 (CET) From: "lms" To: pgsql-sql@postgresql.org Subject: convert with libpq Date: Thu, 16 Nov 2006 20:53:34 +0100 Message-Id: <20061116194623.M54721@isb.com.pl> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 80.48.198.7 (piechcio) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at isb.com.pl X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/172 X-Sequence-Number: 26824 Hi I must convert some records from database. I have table named "langset" in unicode database. When I try use command select convert((SELECT "1" from langset where id_langset=5) using utf_8_to_iso_8859_2) in PGadmin, all is ok, sql return 1 record. But where i execute the same command in libpq I got 0 rows: res=PQexec(conn_lokalne,"select convert((SELECT \"1\" from langset where id_langset=5) using utf_8_to_iso_8859_2)"); printf("%s",PQgetvalue(res,0,0)); What is the problem?