Re: [HACKERS] Types - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: [HACKERS] Types
Date
Msg-id 200001221056.KAA10118@linda.lfix.co.uk
Whole thread Raw
In response to Types  (Michael Meskes <meskes@postgresql.org>)
Responses Re: [HACKERS] Types
Re: [HACKERS] Types
List pgsql-hackers
Michael Meskes wrote: >libpq gives back the internal typenumbers of the attributes. How do I know >which number means
whichtype? I need to find out if the type is an array.
 

If the type is 1007, then:

template1=> select typname from pg_type where oid = 1007;
typname
-------
_int4  
(1 row)

If the typename begins with an underscore, it is an array type.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver              PGP key from public servers; key
ID32B8FAA1                ========================================    "He that giveth unto the poor shall not lack..."
                            Proverbs 28:27 
 




pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Types
Next
From: Michael Meskes
Date:
Subject: Re: [HACKERS] off topic