Re: Get double values from binary cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: oss-dev(at)rambler(dot)ru
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Get double values from binary cursor
Date: 2005-12-15 18:02:20
Message-ID: 15776.1134669740@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Oleg Semykin <oss-dev(at)rambler(dot)ru> writes:
> i want to get a double values from binary cursor

> PQclear( PQexec(conn, "begin; declare my_cur binary cursor for
> select 123.123;") );

This is most likely returning a numeric, not a float8. Try casting
the value to float8 explicitly.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jim C. Nasby 2005-12-15 23:09:54 Re: Obtaining information on the schema of tables which
Previous Message Tom Lane 2005-12-15 15:09:49 Re: Obtaining information on the schema of tables which