pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: hannu@trust.ee
Cc: daveh@insightdist.com
Cc: hannu@trust.ee
Cc: byronn@insightdist.com
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Date: Thu, 23 Apr 1998 17:16:36 -0400 (EDT)
Message-ID: <199804232117.RAA11218@candle.pha.pa.us> (raw)
In-Reply-To: <353FA3F1.F5FC0996@sid.trust.ee>

> 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)



view thread (41+ messages)  latest in thread

Message-ID: <199804232117.RAA11218@candle.pha.pa.us>
Permalink:  ../199804232117.RAA11218@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199804232117.RAA11218@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: maillist@candle.pha.pa.us, hannu@trust.ee, daveh@insightdist.com, byronn@insightdist.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
  In-Reply-To: <199804232117.RAA11218@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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