Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aV1Ym-0005Oj-MY for pgsql-odbc@arkaria.postgresql.org; Sun, 14 Feb 2016 18:38:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aV1Ym-0008OB-9V for pgsql-odbc@arkaria.postgresql.org; Sun, 14 Feb 2016 18:38:16 +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) (envelope-from ) id 1aV1YO-0007YF-To for pgsql-odbc@postgresql.org; Sun, 14 Feb 2016 18:37:53 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aV1YI-0004nO-7X for pgsql-odbc@postgresql.org; Sun, 14 Feb 2016 18:37:51 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 03D9D2038C for ; Sun, 14 Feb 2016 13:37:44 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Sun, 14 Feb 2016 13:37:45 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=3u6Mfovh+oxBSEmN/rECZZ4CTV4=; b=aQzlXj 3OhcyUdU5GG8SH7bfFgHrs+vBI8+a9GH9yHNQctY79dHRxefsNnMeCV4ouJ+4Zd9 AMHSys45Itv2KIJtkHugxHYs5JyfBrp/lJ15h6Gzc8nxM4HjXC9rhtUe1guhFRJJ aVEabD51lhuFkBJVtXk2zfqsbzl24nClGC0KQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=3u6Mfovh+oxBSEm N/rECZZ4CTV4=; b=Ax+Ll44NmG8UCyUJaJwCIeKB44egz6KIFEzK0RmZYC18aHf S3ezjcPfZ8shoyRlVVOsz4yYFGPqBftQwmrCP7Dd/Xn+dAtzFNvZ1ytu0lnwoq6L 62skzqQGChykxfUHYi00sATN17sOo32sP8f5efu5NmSgC2TCbQx6JMfdwdms= X-Sasl-enc: nhmmAmytBELXyzbhvrMCTPlBi2d255LhowH3d5feLi/Y 1455475064 Received: from [192.168.1.2] (174-21-70-246.tukw.qwest.net [174.21.70.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 5E40AC00013; Sun, 14 Feb 2016 13:37:44 -0500 (EST) Subject: Re: PostgreSQL: Inserting NULL values adds empty string. To: "Venkatesan, Sekhar" , "pgsql-odbc@postgresql.org" , "pgsql-sql@postgresql.org" References: <56C0AFEF.70103@aklaver.com> From: Adrian Klaver Message-ID: <56C0C934.7030403@aklaver.com> Date: Sun, 14 Feb 2016 10:36:36 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) 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 On 02/14/2016 10:08 AM, Venkatesan, Sekhar wrote: > It's a C++ application that talks to PostgreSQL DB. I checked the value in database directly. Just notice this has been cross-posted to --sql, it is generally considered good etiquette to not do that. What exact version of psqlodbc are you using? Does the C++ application you mention run on both Linux and Windows? Or to put it another way, what is the program flow that gets the data into the database from Windows versus Linux? Also are we talking about one Postgres database, or one on Windows and one on Linux? > > -----Original Message----- > From: Adrian Klaver [mailto:adrian.klaver@aklaver.com] > Sent: Sunday, February 14, 2016 10:19 PM > To: Venkatesan, Sekhar; pgsql-odbc@postgresql.org; pgsql-sql@postgresql.org > Subject: Re: [ODBC] PostgreSQL: Inserting NULL values adds empty string. > > On 02/14/2016 05:13 AM, Venkatesan, Sekhar wrote: >> Hi Folks, >> >> I am using PostgreSQL 9.4 odbc driver to talk to 9.4 postgreSQL server. > > Through what application? > >> I see that when inserting NULL values into DB is adding empty string in the database only in windows. >> The same insert is adding NULL values into database when linux odbc driver is used to connect to linux database. > > How are you determining this? > >> Is there any configuration in odbc driver end or in server to retain the null values or is it a bug? >> If it is not and is an expected behavior, how to fix it in the application? >> >> Thanks, >> Sekhar >> > > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc