Re: How can I retrieve attribute category with attribute Oid in Cfunction? - Mailing list pgsql-general

From a
Subject Re: How can I retrieve attribute category with attribute Oid in Cfunction?
Date
Msg-id tencent_0D0D19BB70A735647D39E796@qq.com
Whole thread Raw
In response to Re: How can I retrieve attribute category with attribute Oid in Cfunction?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: How can I retrieve attribute category with attribute Oid in Cfunction?
List pgsql-general
hey thank you!!

could you provide some more detail information??

What function should I use to get FormData_pg_type structure??

thanks a lot


------------------ Original message ------------------
From: "Laurenz Albe";
Sendtime: Monday, May 14, 2018 4:11 PM
To: "a"<372660931@qq.com>; "pgsql-general";
Subject: Re: How can I retrieve attribute category with attribute Oid in Cfunction?

a wrote:
> Hi I am writing something that would need to identify the attribute category inside a C function,
> now I may need a way of fast access it, but the information is not stored in FormData_pg_attribute structure.

Are you talking about pg_type.typcategory?

That is accessible from FormData_pg_type.
You'd have to look up atttypid in the TYPEOID cache.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: How can I retrieve attribute category with attribute Oid in Cfunction?
Next
From: "a"
Date:
Subject: Re: How can I retrieve attribute category with attribute Oid in Cfunction?