pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error when getting text longer than MaxLongVarcharSize
2+ messages / 2 participants
[nested] [flat]

* Error when getting text longer than MaxLongVarcharSize
@ 2006-03-30 12:35 Åsmund Kveim Lie <akl@nosyko.no>
  2006-04-01 06:30 ` Re: Error when getting text longer than MaxLongVarcharSize Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 1 reply; 2+ messages in thread

From: Åsmund Kveim Lie @ 2006-03-30 12:35 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

When fetching text data longer than MaxLongVarcharSize, the driver 
returns the length of the actual data in the database rather than the 
truncated length to retrieve.

The last parameter (StrLen_or_IndPtr) to SQLBindCol() is a pointer to 
where to place the length of the data to get. When we later call 
SQLExtendedFetch() it will update this value to be the length of the 
string. If you have a text in the database which is longer than the 
MaxLongVarcharSize the ODBC will truncate the value to return down to 
MaxLongVarcharSize (as printed in the log file).

The bug is that in version 08.01.200 (ANSI) SQLExtendedFetch() updates 
the string length to be the length in the database and NOT the length of 
the actual (truncated) value returned. We later rely on this value to 
get the string value from memory. We use PostgreSQL 8.1.3 on Debian 
Sarge and ODBC on Windows.

I hope this is enough information to enable you locate the bug. If you 
need more information or MyLog please let me know, but I have not 
attached it because my posts with log attachments does not seem to get 
through on this mailing list.

Best regards,

Åsmund Lie





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Error when getting text longer than MaxLongVarcharSize
  2006-03-30 12:35 Error when getting text longer than MaxLongVarcharSize Åsmund Kveim Lie <akl@nosyko.no>
@ 2006-04-01 06:30 ` Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 0 replies; 2+ messages in thread

From: Hiroshi Inoue @ 2006-04-01 06:30 UTC (permalink / raw)
  To: Åsmund Kveim Lie <akl@nosyko.no>; +Cc: pgsql-odbc

Åsmund Kveim Lie wrote:
> Hi,
> 
> When fetching text data longer than MaxLongVarcharSize, the driver 
> returns the length of the actual data in the database rather than the 
> truncated length to retrieve.

Not only in the above case but in other all cases the ODBC driver returns
actual length not the truncated length.

regards,
Hiroshi Inoue



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-04-01 06:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-30 12:35 Error when getting text longer than MaxLongVarcharSize Åsmund Kveim Lie <akl@nosyko.no>
2006-04-01 06:30 ` Hiroshi Inoue <inoue@tpf.co.jp>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox