Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BA811475AFF for ; Fri, 3 Jan 2003 22:07:56 -0500 (EST) Received: from smtp-3.paradise.net.nz (smtp-3a.paradise.net.nz [202.0.32.196]) by postgresql.org (Postfix) with ESMTP id A9A75475921 for ; Fri, 3 Jan 2003 22:07:55 -0500 (EST) Received: from kg15.kgdomain.com (203-79-95-137.apx0.paradise.net.nz [203.79.95.137]) by smtp-3.paradise.net.nz (Postfix) with ESMTP id E7A5EAE409 for ; Sat, 4 Jan 2003 16:07:48 +1300 (NZDT) Subject: pg_field_size From: Kevin Gordon To: pgsql-php@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 04 Jan 2003 16:05:09 +1300 Message-Id: <1041649533.16040.12.camel@kg15.kgdomain.com> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/7 X-Sequence-Number: 1752 Hi, I wish to set on screen field sizes by using pg_field_size(). I have been successful with odbc_field_len() connected to Postgres but wish to convert to pg_ functions. Problem: all of these fields return -1 (indicating variable length): CREATE TABLE menu_lines ( systemcode char (2) , menuname char (32) , menuline char (2) , description varchar (32) , accesscode char (1) , accesstype char (1) , programname varchar (32) , formatfile varchar (32) , With char(2) should pg_field_size() return 2? odbc_field_len() does return 2! I am using PHP 4.2.3. Any comments please. Kevin Gordon.