Re: getting type name - Mailing list pgsql-hackers

From Michael Fuhr
Subject Re: getting type name
Date
Msg-id 20060709184953.GA64380@winnie.fuhr.org
Whole thread Raw
In response to getting type name  (Tzahi Fadida <Tzahi.ML@gmail.com>)
Responses Re: getting type name  (Tzahi Fadida <Tzahi.ML@gmail.com>)
List pgsql-hackers
On Sun, Jul 09, 2006 at 09:03:21PM +0300, Tzahi Fadida wrote:
> How do i get a char * type from a type Oid. i.e. getStringTypeFromOid(INT4OID) 
> will return "int4".

Server-side or client-side?  In the backend I think you could use
format_type_be() or format_type_with_typemod(), both declared in
utils/builtins.h and defined in src/backend/utils/adt/format_type.c.

-- 
Michael Fuhr


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: lastval exposes information that currval does not
Next
From: Tzahi Fadida
Date:
Subject: Re: getting type name