Re: psqlODBC text length with no records

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Barry Bell <Barry(dot)Bell(at)hartehanks(dot)com>, Hiroshi Saito <hiroshi(at)winpg(dot)jp>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Anna Gershnik <agershnik(at)tableausoftware(dot)com>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlODBC text length with no records
Date: 2014-05-14 13:49:52
Message-ID: 53737480.6070808@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Barry Bell 2014-05-14 13:56:41 Re: psqlODBC text length with no records
Previous Message Heikki Linnakangas 2014-05-14 13:46:28 Re: relkind check in info.c