convert with libpq

From: "lms" <piechcio(at)inetcafe(dot)eu(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: convert with libpq
Date: 2006-11-16 19:53:34
Message-ID: 20061116194623.M54721@isb.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

Browse pgsql-sql by date

  From Date Subject
Next Message Ezequias Rodrigues da Rocha 2006-11-16 20:31:08 Re: Random()
Previous Message A. Kretschmer 2006-11-16 19:16:32 Re: Random()