pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: alain.reymond@ceia.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7891: ODBC error on SQL_REAL
Date: Tue, 19 Feb 2013 17:35:24 +0000
Message-ID: <E1U7r6C-0002Zn-R0@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      7891
Logged by:          Alain Reymond
Email address:      alain.reymond@ceia.com
PostgreSQL version: 9.2.3
Operating system:   Centos 5.9 (32 bits)
Description:        

Hello,

I use Postgresql 9.2.3 under Centos 5.9. (32 bits).
We access our database through unixodbc (unixODBC-2.2.11-10.el5.i386).

I have defined a table
CREATE TABLE rresultats
(
  numbil integer,
  numparam smallint,
  mesure smallint,
  dev real
)

I access the table via esql for cobol.

When I try to insert a record in the table, I get a sqlcode = -7 in return.
It seems that SQL_REAL is not properly mapped to the comp-1 in cobol ( =
float in C).

Here is the logfile :
[ODBC][19186][SQLBindParameter.c][193]
        Entry:           
            Statement = 0x83227c8           
            Param Number = 4           
            Param Type = 1           
            C Type = 7 SQL_C_FLOAT           
            SQL Type = 7 SQL_REAL           
            Col Def = 7           
            Scale = 0           
            Rgb Value = 0x83225a8           
            Value Max = 4           
            StrLen Or Ind = 0x83225a4
[ODBC][19186][SQLBindParameter.c][339]
        Exit:[SQL_SUCCESS]
[ODBC][19186][SQLExecute.c][183]
        Entry:           
            Statement = 0x83227c8
[ODBC][19186][SQLExecute.c][344]
        Exit:[SQL_ERROR]
        DIAG [S1000] ERREUR:  syntaxe en entrée invalide pour le type
real : « 15,5 » au caractère 141;
Error while executing the query

[ODBC][19186][SQLError.c][342]
        Entry:               
            Statement = 0x83227c8               
            SQLState = 0x82e434a               
            Native = 0xbfa1e540               
            Message Text = 0x82e4350               
            Buffer Length = 1023               
            Text Len Ptr = 0xbfa1e546
[ODBC][19186][SQLError.c][379]
        Exit:[SQL_SUCCESS]                   
            SQLState = S1000                   
            Native = 0xbfa1e540 -> 7                   
            Message Text = [[unixODBC]ERREUR:  syntaxe en entrée
invalide pour le type real : « 15,5 » au caractère 141;
Error while executing the query]

I tried with double precision : same thing.

Curiously, we have a version using unixODBC-2.2.11-7.1 and Posgresql 8.4 and
have no problem...

Regards




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



Message-ID: <E1U7r6C-0002Zn-R0@wrigleys.postgresql.org>
Permalink:  ../E1U7r6C-0002Zn-R0@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1U7r6C-0002Zn-R0@wrigleys.postgresql.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-bugs@postgresql.org
  Cc: alain.reymond@ceia.com
  Subject: Re: BUG #7891: ODBC error on SQL_REAL
  In-Reply-To: <E1U7r6C-0002Zn-R0@wrigleys.postgresql.org>
  References: <E1U7r6C-0002Zn-R0@wrigleys.postgresql.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