pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: oss-dev@rambler.ru
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Get double values from binary cursor
Date: Thu, 15 Dec 2005 13:02:20 -0500
Message-ID: <15776.1134669740@sss.pgh.pa.us> (raw)
In-Reply-To: <43A16B2D.20203@rambler.ru>
References: <43A16B2D.20203@rambler.ru>

Oleg Semykin <oss-dev@rambler.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



view thread (2+ messages)

Message-ID: <15776.1134669740@sss.pgh.pa.us>
Permalink:  ../15776.1134669740@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15776.1134669740@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, oss-dev@rambler.ru
  Subject: Re: Get double values from binary cursor
  In-Reply-To: <15776.1134669740@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox