Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aups7-00020v-Ta for pgsql-odbc@arkaria.postgresql.org; Mon, 25 Apr 2016 23:24:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aups7-0000qb-GE for pgsql-odbc@arkaria.postgresql.org; Mon, 25 Apr 2016 23:24:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1auprk-0000QY-SO for pgsql-odbc@postgresql.org; Mon, 25 Apr 2016 23:24:33 +0000 Received: from mail2.asahi-net.or.jp ([202.224.39.198]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auprh-0003vx-7W for pgsql-odbc@postgresql.org; Mon, 25 Apr 2016 23:24:31 +0000 Received: from [192.168.1.3] (h216161.dynamic.ppp.asahi-net.or.jp [61.114.216.161]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id AD90FECAF; Tue, 26 Apr 2016 08:24:22 +0900 (JST) Subject: Re: [psqlODBC 09.05.0100] could not insert SQLINTEGER to bytea column To: Huong Dangminh , Heikki Linnakangas References: <75DB81BEEA95B445AE6D576A0A5C9E9364D06640@BPXM05GP.gisp.nec.co.jp> Cc: "pgsql-odbc@postgresql.org" , Hiroshi Yanagisawa From: "Inoue, Hiroshi" Message-ID: <571EA726.9000101@dream.email.ne.jp> Date: Tue, 26 Apr 2016 08:24:22 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <75DB81BEEA95B445AE6D576A0A5C9E9364D06640@BPXM05GP.gisp.nec.co.jp> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Hi Huong, Unfortunately I don't know details about commits referenced. However I'm suspicious if calling sqltype_to_bind_pgtype() is rather dangerous. regards, Hiroshi Inoue On 2016/04/25 15:50, Huong Dangminh wrote: > Hi, > > First of all, many thanks for releasing version of 09.05.021 > Which does not necessary to install VC++ 2013 runtime environment. > > So, we are trying to use version of 09.05.021 now, but have faced > with another problem, could you confirm the belows for me? > > [problem] > In 09.03.0400 we have no problem when insert into PostgreSQL bytea column with SQLINTEGER data type. > But in 09.05.0210 it was returned with below error: > > ERROR: column "id" is of type bytea but expression is of type integer; > > [confirmation] > (1) It is seem come from the below release, is that right? > > ---psqlODBC 09.05.0100 Release--- > 10. Fix quoting bugs in sending integer query parameters to server > The drivers used to assume that if a parameter's SQL type is SQL_INTEGER or SQL_SMALLINT, > the value does not require quoting when its send to the server. For example, "SELECT ?", > with parameter 123 was translated to "SELECT 123", when UseServerSidePrepare was not enabled. > However, there was no check that the query parameter in fact contained a valid integer, > when replacing the parameter markers with their values. Also, in a query like "SELECT 0-?", > a negative value needs to have parens around it, as in "SELECT 0-(-123)". > --- > > (2) Does the above release was made for below commit? > > http://git.postgresql.org/gitweb/?p=psqlodbc.git;a=commitdiff;h=1ccd04c70b8037b268eefcaae09ce131c8c33b59 > > (3) But we found exactly the below commit made obove ERROR. > As the release note, does this commit completely did the thing which not yet done in commit in (2) sir? > > http://git.postgresql.org/gitweb/?p=psqlodbc.git;a=commitdiff;h=085e9324eb5a592f3b73f594311819cbf8dc5f2d > > Thanks and best regards, > Dang Minh Huong > NEC Solution Innovators, Ltd. > http://www.nec-solutioninnovators.co.jp/en/ -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc