On Mon, 2004-07-19 at 21:58, sandra ruiz wrote:
> hi, I need to find out the length of a varchar attribute ..
> 
> for example,if a I have an atribute "description varchar(256)"  I would 
> expect to see this "256" in the pg_attribute table.
> 
> there's is an "attlen" In the pg_attribute but this doesn't give any 
> information

SELECT pg_catalog.format_type(a.atttypid, a.atttypmod)
  FROM pg_attribute AS a;

would return "character varying(10)" or similar.

-- 
Oliver Elphick                                          [EMAIL PROTECTED]
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Blessed is the man that trusteth in the LORD, and
      whose hope the LORD is."            Jeremiah 17:7


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to