Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZZJ-0001q1-PC for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 13:50:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkZZJ-0006eB-7n for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 13:50:01 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZZH-0006cg-VD for pgsql-odbc@postgresql.org; Wed, 14 May 2014 13:50:00 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZZD-00087a-FK for pgsql-odbc@postgresql.org; Wed, 14 May 2014 13:49:59 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id EF5CD20A31 for ; Wed, 14 May 2014 09:49:53 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 14 May 2014 09:49:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=VKeGCxXxx2XFwokl3Ot+zg6ovXY=; b=hFJRLjNETNHXbSVCUKI9/uV0eFMq o84gUQLJMj8ksPMxhM0C0dUxSGTTZmHtkNb1CQpeG6cuSbcoHPibmIcXBdcwj+6q I2ExAGKMimDI/KCNiNThueyeahXxmUL82tmZyMjkFhsi3i6WvVE2ijUZrXz5pSYx 4OyxQQo++S0+iCE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=VKeGCxXxx2XFwokl3Ot+zg 6ovXY=; b=eDS8QUsu2qS2Y49L1tQJUmRyTW6wsu1diBQp6ll7eHxHJkEd2nbZEZ St6ZbODRXLNwtjfYMaorZm7enn1NbNyOFelvywOiHX3wAdiAO9SL432Pkn2rrxjK MV8cFyEqflufF1bT8dld++5QQCopzzwBI8iFJjxW/tGiUHqMZ9OH8= X-Sasl-enc: RC7/DSYIM7sUBsJzPUcggRRtxP5Y675AfQxTvDZ++7HB 1400075393 Received: from panda.site (unknown [65.102.186.57]) by mail.messagingengine.com (Postfix) with ESMTPA id E7688C007AE; Wed, 14 May 2014 09:49:52 -0400 (EDT) Message-ID: <53737480.6070808@aklaver.com> Date: Wed, 14 May 2014 06:49:52 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Barry Bell , Hiroshi Saito , Michael Paquier , Hiroshi Inoue CC: Heikki Linnakangas , Anna Gershnik , "pgsql-odbc@postgresql.org" Subject: Re: psqlODBC text length with no records References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com> <5372B875.3010407@aklaver.com> <3fca930240554b80bc4174911fb49400@BY2PR08MB281.namprd08.prod.outlook.com> <53736874.2090905@aklaver.com> <53736E22.4090506@aklaver.com> In-Reply-To: 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 05/14/2014 06:31 AM, Barry Bell wrote: > I am referring the output of the odbc driver from SQL statement: > SELECT initcap('ABCDEF')::varchar vv FROM dual WHERE 1=0 > > You link only show the date type in postgres and I am asking about the driver output. This is what you asked: "You said the initcap function return "text", Is this a "short" text like a varchar Or a long text like a clob,memo etc?" and I answered that question. > Are you using this statement with the ODBC driver? No, as I said previously I do not have an ODBC set up available at the moment. > (Output from the ODBC driver may be different format then for pg admin etc). > > SELECT initcap('ABCDEF')::varchar vv FROM dual WHERE 1=0 > I am expending a "character varying" or "varchar" output from the sql statement > But the I getting the postgres "text" > If the SQL is changed to return records, SELECT initcap('ABCDEF')::varchar vv FROM dual > The output is varchar > > So > SELECT initcap('ABCDEF')::varchar vv FROM dual > Works, returns varchar > So the issues is with: > SELECT initcap('ABCDEF')::varchar vv FROM dual WHERE 1=0 > Returning "text", sqllongvar a different type then above, > Does not change with any unknownsize or datetype setting in ODBC driver. As I recall this is eventually ending up in a VFP application. So where are you actually seeing the different behavior, in the app or somewhere before the app? > > Barry Bell -- 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