Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WzRmf-0006QE-Sr for pgsql-odbc@arkaria.postgresql.org; Tue, 24 Jun 2014 14:33:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WzRmf-0007hA-Cg for pgsql-odbc@arkaria.postgresql.org; Tue, 24 Jun 2014 14:33:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WzRme-0007eh-7M for pgsql-odbc@postgresql.org; Tue, 24 Jun 2014 14:33:16 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WzRma-00044P-Ey for pgsql-odbc@postgresql.org; Tue, 24 Jun 2014 14:33:14 +0000 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 889C221BFA; Tue, 24 Jun 2014 10:33:07 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 24 Jun 2014 10:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=I/B6WgtPKXcx48Iazoc6r5EcbAI=; b=nKka4n/ZgiUOMkPZPUWpfz/Ip+8d MQ2nmGzt6OolL8V+Dp/6FlLQ0dOJDohchByEGWWIW7xKJW/qgCYmckuIu64VW0M+ bIv+74Y3j3mwJHFtjvYN3DXzv2CMLPgNt80qsuJ1hLFkaV3TnEk577nZdAKu/YCi 9MzQof2QQqwUeZM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=I/B6WgtPKXcx48Iazoc6r5 EcbAI=; b=Ake9xm1ZehmFg+yngQpMdQPwJzBvGaHK+UZ+PzWJraags0wF2S67lJ oVAdNJAQgxtPZDmka6a4h3+q0Kx26UFDNa8IbyguB027LiOsrWSl2K7vF1la7FMU 6jx4/pi75o5WtyGhbJjzA9zYDxeK86jnsZrqMo7PVr48f6eACYgbg= X-Sasl-enc: wvAqX2G8apKVEg+JI0lWEHP81cIIqcnR5rcMxkfVsepn 1403620383 Received: from panda.site (unknown [65.102.186.57]) by mail.messagingengine.com (Postfix) with ESMTPA id E877568028A; Tue, 24 Jun 2014 10:33:02 -0400 (EDT) Message-ID: <53A98C1E.6010307@aklaver.com> Date: Tue, 24 Jun 2014 07:33:02 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Desenvolvimento , pgsql-odbc@postgresql.org Subject: Re: Bug when performing command SELECT without cast References: <53A46E58.8010108@planit.com.br> <53A4ACD9.5050005@aklaver.com> <53A963CA.30008@planit.com.br> <53A98457.8050806@aklaver.com> <53A98990.1070605@planit.com.br> In-Reply-To: <53A98990.1070605@planit.com.br> Content-Type: text/plain; charset=ISO-8859-1; 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 06/24/2014 07:22 AM, Desenvolvimento wrote: > > ON 24/06/2014 10:59 AM, Adrian Klaver wrote: >> On 06/24/2014 04:40 AM, Desenvolvimento wrote: >>> I'm working with OS Windows 8.1 Pro 64-bit and my server is: >>> Linux - Cent-OS >>> PostgreSQL 8.4.21 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) >>> 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit >>> >>> About the empty space, the correct string is: >>> "SELECT '1058';" -- Without space. >>> >>> If I cast it, the return will be: >>> "SELECT '1058'::char(4);" >>> Return: "1058" >> >> >> In what program are you doing the above? >> >> What happens if you do?: >> >> "SELECT 1058;" >> >> >> > > I'm using Microsoft Visual FoxPro 9.0 SP2 with driver "PostgreSQL UNICODE". > When I execute "SELECT 1058;" my return is "1058" type numeric. > There was a previous thread about VFP and text/string issues(warning it is long and not resolved): http://www.postgresql.org/message-id/152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com As near as I could figure VFP and ODBC are not always in agreement on what is the correct type for a string. I have to run now but I will take another look when I get a chance. -- 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