Reported lengths of char fields - psqlODBC

From: Bob Brodd <bbrodd(at)instantiations(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Reported lengths of char fields - psqlODBC
Date: 2019-02-05 22:23:45
Message-ID: CAHbe0hH-degRJXD2tmNCoA1RBrVJGLKj_U7udB04uJYGx1-mbQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Environment:
Linux Mint 18.3 x64 (base on Ubuntu 16.04 package base)
Postgresql v 9.5.14
unixODBC v2.3.1-4.1
psqlODBC v1:09.03.0300-1

I created a simple table containing one column of type character (n).
When I ask for the width of the column via (ODBC)SQLColAttribute function,
it answers (n*6) , so if defined as character(1) the call reports length 6,
character(2) reports 12, character(4) reports 24, etc.

I see the same kind of results when using a varchar(n) field (character
varying (2), etc ) as well .

Is this expected, or am I doing something wrong?

Thanks,
Bob

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Clemens Ladisch 2019-02-09 07:57:18 Re: Reported lengths of char fields - psqlODBC
Previous Message gmail Vladimir Koković 2019-02-04 19:00:51 PG12 patch