Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.7.5) with ESMTP id SAA25058; Thu, 23 Apr 1998 18:01:01 -0400 (EDT) Received: (from maillist@localhost) by candle.pha.pa.us (8.8.5/8.8.5) id RAA11218; Thu, 23 Apr 1998 17:17:52 -0400 (EDT) From: Bruce Momjian Message-Id: <199804232117.RAA11218@candle.pha.pa.us> Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size To: hannu@trust.ee (Hannu Krosing) Date: Thu, 23 Apr 1998 17:16:36 -0400 (EDT) Cc: daveh@insightdist.com, hannu@trust.ee, byronn@insightdist.com, pgsql-hackers@postgreSQL.org, pgsql-interfaces@postgreSQL.org In-Reply-To: <353FA3F1.F5FC0996@sid.trust.ee> from "Hannu Krosing" at Apr 23, 98 11:26:25 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > is this on client side or server side? > > Last time I checked (it was in 6.2 protocol) it was not sent to client. > > What I need is the defined max length of varchar (or char), not just > actual length of each field of that type. This is used by Borlands BDE, > and if this changes, depending on the where clause, it breaks BDE. Can't you do: select atttypmod from pg_attribute where attrelid = 10003 and attname = 'col1'; That will give the length + 4 bytes. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)