Zsolt Varga wrote:

> On Thu, 23 Apr 1998, Byron Nikolaidis wrote:
>
> some little thing...
> from delphi I see the following Postgres types as:
> ---------------------------------------------
> bool --> char(2)

Bool is being handled as character data, so the 2 includes the null
terminator.This was under debate for a while.  Handling it as a real
SQL_BOOL didn't seem to work well under Access so thats why it is char.
I could probably fix this now.

> varchar(x)  x > 255  --> varchar(255)

Varchar's are limited in the driver to 255 to allow MS Access to be able
to index on these fields.  Same with char(x).

> text -- > longvarchar(484)

I am still trying to figure this one out.  The size should be 4096.  The
memo text DOES seem to display properly, even though the size is screwed
up.

> char(x) --> varchar(x);

char(x), (i.e., bpchar), as well as varchar, is handled as SQL_VARCHAR.
In the future, we may have a feature that allows the user to decide how
to map Postgres data types to ODBC data types.  Perhaps char(x), for
now,  should be mapped to SQL_CHAR?

Byron

P.S.  I have done more testing with Borland Database Explorer, and fixed
a few more things.   I only had time to update the DLL not the self
extracting EXE).  Download
"http://www.insightdist.com/psqlodbc/postdll.zip" and unzip into your
\windows\system directory.  You must have already installed the new
driver at least once for this to work!

Note that until the backend is patched as was discussed with Bruce in
previous conversations on the hackers/interfaces lists, Postgres varchar
type will return "I don't know" as the precision.  Borland handles this
ok, but reserves a large amount of display area for the data (because it
doesnt know how big the field is).

Postgres char(x) type will show the correct length.

Byron


Thu, 23 Apr 1998 23:35:40 -0400
Byron Nikolaidis <byronn@insightdist.com>
Re: ODBC + Delphi (GREAT!) + some little thing//