Re: ODBC + Delphi (GREAT!) + some little thing//

From: Byron Nikolaidis <byronn(at)insightdist(dot)com>
To: Zsolt Varga <redax(at)agria(dot)hu>, dfumagalli(at)art-media(dot)it, pgsql-interfaces <pgsql-interfaces(at)postgreSQL(dot)org>, "hackers(at)postgreSQL(dot)org" <hackers(at)postgreSQL(dot)org>
Subject: Re: ODBC + Delphi (GREAT!) + some little thing//
Date: 1998-04-24 03:35:40
Message-ID: 3540088C.D83D7F4C@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-04-24 04:05:30 Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Previous Message Byron Nikolaidis 1998-04-24 02:44:07 Re: [HACKERS] Re: [INTERFACES] retrieving varchar size

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 1998-04-24 04:05:30 Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Previous Message Byron Nikolaidis 1998-04-24 02:44:07 Re: [HACKERS] Re: [INTERFACES] retrieving varchar size