Re: int8 becames string in BDE :-( - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: int8 becames string in BDE :-(
Date
Msg-id 3CFDB27A.20ADD509@tpf.co.jp
Whole thread Raw
In response to Re: int8 becames string in BDE :-(  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-odbc
Dave Page wrote:

> > -----Original Message-----
> > From: SZ?CS Gabor [mailto:surrano@mailbox.hu]
> >
> > Gabor here, from own address -- thanks for CC'ing. please keep on.
> >
> > Well, last we discussed driver GUI problems; here is an
> > extreme request about the new int8 return type option:
> >
> > Is it possible, and, if not a significant work, would you
> > (Hiroshi) add another choice, namely, int4? (argh :) ) It
> > would be a real quick fix to our problem to help change
> > between the databases.
>
> What's wrong with int4? I don't recall hearing of any
> problems with them in the last 5 years or so.
> If this request is to make your life easier
> on your current project rather than fix an actual bug, then I would
> strongly object to adding such a hack to the driver and would suggest
> that you take a copy of the source and look into hacking it yourself.
> The code in question is in pgtypes.c - the int8 hacks have the comment
> /* Change this to SQL_BIGINT for ODBC v3 bjm 2001-01-23 */ above them
> for reference.

I'm not sure if the current code (returning SQL_VARCHAR)
is proper. Probably returning SQL_BIGINT is proper
but there are some(many ?) applications which couldn't
handle SQL_BIGINT properly. OTOH PostgreSQL has changed
the result type of sum(int4) from int4(pre 7.0) ->
numeric(7.1) -> int8(7.2). It's understandable to me that
there are some applications which are unable to cope with
the capricious changes.
I'm inclined to add *Int8 As int4* selection. However
note that the option is a hack and you can't cope with
int8 table columns with the option.

regards,
Hiroshi Inoue

pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: int8 becames string in BDE :-(
Next
From: "Dave Page"
Date:
Subject: Re: int8 becames string in BDE :-(