pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1000567 ] Discrepant results versus other connections
Date: Mon,  6 Mar 2006 16:54:40 +0000 (GMT)
Message-ID: <20060306165440.D256B1033824@pgfoundry.org> (raw)

Bugs item #1000567, was opened at 2006-02-24 10:23
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000567&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Discrepant results versus other connections

Initial Comment:
I've found a case where psqlODBC doesn't match JODBC, psql, or Perl-DBD::Pg.  It looks like a numeric/floating point issue perhaps?

Using psqlodbc-08.00.0100 and psqlodbc-08.01.0200. Both compiled as 64bit, Postgres 8.0.1.


Sample code:

CREATE OR REPLACE FUNCTION plpgsql_multiply(numeric, float) RETURNS numeric AS $$
DECLARE
BEGIN
    RETURN $1 * $2;
END
$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION perl_ge(numeric, float) RETURNS bool AS $$
    if ($_[0] >= $_[1]) { return true; }
    return false;
$$ LANGUAGE plperl;



SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1));

-- true using JODBC, DBD::Pg, psql
-- false using ODBC

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-06 08:54

Message:
I'm using iSQL for testing, but the problem was discovered using SAS.  

In iSQL I simply use the SELECT statement above to get the result, if that is what you are asking.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-01 15:40

Message:
How are you calling the function concretely using ODBC ?

----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000567&group_id=1000125



view thread (4+ messages)  latest in thread

Message-ID: <20060306165440.D256B1033824@pgfoundry.org>
Permalink:  ../20060306165440.D256B1033824@pgfoundry.org/
Also on:    postgresql.org/message-id/20060306165440.D256B1033824@pgfoundry.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: noreply@pgfoundry.org
  Subject: Re: [ psqlodbc-Bugs-1000567 ] Discrepant results versus other connections
  In-Reply-To: <20060306165440.D256B1033824@pgfoundry.org>
  References: <20060306165440.D256B1033824@pgfoundry.org>

* 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