Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DAFCD476588 for ; Thu, 21 Nov 2002 19:12:05 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id BD81047651B for ; Thu, 21 Nov 2002 19:12:03 -0500 (EST) Received: (qmail 26009 invoked from network); 22 Nov 2002 00:12:05 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 22 Nov 2002 00:12:05 -0000 Received: from tpf.co.jp (3dgateway1 [126.0.1.60]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id JAA02992; Fri, 22 Nov 2002 09:12:03 +0900 (JST) Message-ID: <3DDD76AE.410DC53E@tpf.co.jp> Date: Fri, 22 Nov 2002 09:13:34 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Graham Vickrage Cc: pgsql-odbc@postgresql.org Subject: Re: Text field truncation problem References: <00de01c29180$749309f0$6d00000a@GVICKRAGE> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/116 X-Sequence-Number: 2293 Graham Vickrage wrote: > > I am trying to sort out a problem with ODBC truncating text fields. > > I am running Postgres 7.2.3, and using the latest ODBC driver from the > official website. > > When I connect through the windows client I get the message: > > Test2.pl: DBD::ODBC::st fetchrow_hashref failed: Fetched item was > truncated. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1) > > I have attached the log from the ODBC if that is any use. Judging from the log, your program is binding a (80+1) byte buffer for the "description" text field. I don't understand where the 80(or 81) come from. OTOH your program seems to be binding the "name" field with a right(50+1 byte) sized buffer. regards, Hiroshi Inoue http://w2422.nsk.ne.jp/~inoue/