Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7rKV-0005Ak-Hm for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 17:50:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U7rKU-0005q6-Ms for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 17:50:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7r6F-00043Y-G0 for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 17:35:27 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7r6E-00056D-0G for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 17:35:26 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7r6D-00052P-2L for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 17:35:25 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1U7r6C-0002Zn-R0 for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 17:35:24 +0000 Date: Tue, 19 Feb 2013 17:35:24 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7891: ODBC error on SQL_REAL To: pgsql-bugs@postgresql.org From: alain.reymond@ceia.com X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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:=20=20=20=20=20=20=20=20 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 =3D -7 in retur= n. It seems that SQL_REAL is not properly mapped to the comp-1 in cobol ( =3D float in C). Here is the logfile : [ODBC][19186][SQLBindParameter.c][193] Entry:=20=20=20=20=20=20=20=20=20=20=20 Statement =3D 0x83227c8=20=20=20=20=20=20=20=20=20=20=20 Param Number =3D 4=20=20=20=20=20=20=20=20=20=20=20 Param Type =3D 1=20=20=20=20=20=20=20=20=20=20=20 C Type =3D 7 SQL_C_FLOAT=20=20=20=20=20=20=20=20=20=20=20 SQL Type =3D 7 SQL_REAL=20=20=20=20=20=20=20=20=20=20=20 Col Def =3D 7=20=20=20=20=20=20=20=20=20=20=20 Scale =3D 0=20=20=20=20=20=20=20=20=20=20=20 Rgb Value =3D 0x83225a8=20=20=20=20=20=20=20=20=20=20=20 Value Max =3D 4=20=20=20=20=20=20=20=20=20=20=20 StrLen Or Ind =3D 0x83225a4 [ODBC][19186][SQLBindParameter.c][339] Exit:[SQL_SUCCESS] [ODBC][19186][SQLExecute.c][183] Entry:=20=20=20=20=20=20=20=20=20=20=20 Statement =3D 0x83227c8 [ODBC][19186][SQLExecute.c][344] Exit:[SQL_ERROR] DIAG [S1000] ERREUR: syntaxe en entr=C3=83=C2=A9e invalide pour le= type real : =C3=82=C2=AB 15,5 =C3=82=C2=BB au caract=C3=83=C2=A8re 141; Error while executing the query [ODBC][19186][SQLError.c][342] Entry:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Statement =3D 0x83227c8=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 SQLState =3D 0x82e434a=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Native =3D 0xbfa1e540=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 Message Text =3D 0x82e4350=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 Buffer Length =3D 1023=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Text Len Ptr =3D 0xbfa1e546 [ODBC][19186][SQLError.c][379] Exit:[SQL_SUCCESS]=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 SQLState =3D S1000=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Native =3D 0xbfa1e540 -> 7=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 Message Text =3D [[unixODBC]ERREUR: syntaxe en entr=C3=83=C2= =A9e invalide pour le type real : =C3=82=C2=AB 15,5 =C3=82=C2=BB au caract=C3=83= =C2=A8re 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 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs