Oid to text...

Started by Katsaros Kwn/nosover 21 years ago3 messagesgeneral
Jump to latest
#1Katsaros Kwn/nos
ntinos@aueb.gr

Hi,

Given the Oid restype of a Resdom "object", is there any system table I
could query in order to retrieve the text representation of this type?

If for example a Resdom restype is 23 how can I get the string "integer"
or something like that? Are these mappings stored anyware?

Thanks in advance,
Ntinos Katsaros

PS: I searched the archives but my queries did not give anything...

#2Ian Lawrence Barwick
barwick@gmail.com
In reply to: Katsaros Kwn/nos (#1)
Re: Oid to text...

On 22 Nov 2004 14:25:26 +0200, Katsaros Kwn/nos <ntinos@aueb.gr> wrote:

Hi,

Given the Oid restype of a Resdom "object", is there any system table I
could query in order to retrieve the text representation of this type?

If for example a Resdom restype is 23 how can I get the string "integer"
or something like that? Are these mappings stored anyware?

pg_catalog.pg_type ?

Ian Barwick

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Katsaros Kwn/nos (#1)
Re: Oid to text...

"Katsaros Kwn/nos" <ntinos@aueb.gr> writes:

Given the Oid restype of a Resdom "object", is there any system table I
could query in order to retrieve the text representation of this type?

If you're talking about C code inside the backend, format_type_be() is
the usual subroutine.

regards, tom lane