pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Barry Bell <Barry.Bell@hartehanks.com>
To: Hiroshi Saito <hiroshi@winpg.jp>
To: Michael Paquier <michael.paquier@gmail.com>
To: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Anna Gershnik <agershnik@tableausoftware.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: psqlODBC text length with no records
Date: Wed, 14 May 2014 05:58:28 -0700
Message-ID: <53736874.2090905@aklaver.com> (raw)
In-Reply-To: <3fca930240554b80bc4174911fb49400@BY2PR08MB281.namprd08.prod.outlook.com>
References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com>
	<5372B875.3010407@aklaver.com>
	<3fca930240554b80bc4174911fb49400@BY2PR08MB281.namprd08.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 05/14/2014 05:51 AM, Barry Bell wrote:
> Tried every setting for unknown size
> Abd every settubg fir date tyoe options.
>   and it always comes back as SQllongvarchar (Memo, CLOB).
>
> The "    Text as LongVarChar: PostgreSQL TEXT type is mapped to SQLLongVarchar, otherwise SQLVarchar." Is not working when no records are returned
>
> It will work if the initcap function is not used.
>
> Try it yourself with this sql statement:
>
> SELECT initcap('ABCDEF') vv FROM dual WHERE 1=0
>
> Will return the a sqlongvarchar(Memo,CLOB)

I do not have an ODBC test set up available right now.

FYI initcap returns TEXT:

http://www.postgresql.org/docs/9.3/interactive/functions-string.html

initcap(string) 	text 	


So what happens if you cast to varchar?:

SELECT initcap('ABCDEF')::varchar vv FROM dual WHERE 1=0

>
>
>


-- 
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



view thread (23+ messages)  latest in thread

Message-ID: <53736874.2090905@aklaver.com>
Permalink:  ../53736874.2090905@aklaver.com/
Also on:    postgresql.org/message-id/53736874.2090905@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: adrian.klaver@aklaver.com, Barry.Bell@hartehanks.com, hiroshi@winpg.jp, michael.paquier@gmail.com, inoue@tpf.co.jp, hlinnakangas@vmware.com, agershnik@tableausoftware.com
  Subject: Re: psqlODBC text length with no records
  In-Reply-To: <53736874.2090905@aklaver.com>
  References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com> <5372B875.3010407@aklaver.com> <3fca930240554b80bc4174911fb49400@BY2PR08MB281.namprd08.prod.outlook.com> <53736874.2090905@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox