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

From Laurenz Albe
Subject Re: How can I retrieve attribute category with attribute Oid inCfunction?
Date
Msg-id 1526287889.2675.14.camel@cybertec.at
Whole thread Raw
In response to Re: How can I retrieve attribute category with attribute Oid in Cfunction?  ("a" <372660931@qq.com>)
List pgsql-general
a wrote:

> could you provide some more detail information??
> 
> What function should I use to get FormData_pg_type structure??
> 
> BTW, I searched another function called "lookup_type_cache", which will return a pointer of structure of
"TypeCacheEntry".
> 
> The structure contains "TypeCacheEntry.typtype" that may also help to
identify the type.
> 
> But I'm concerning about possible memory leak and allocation stuff. Is it safe to just declare a pointer and call
thisfunction??
 

In "logicalrep_write_typ" in src/backend/replication/logical/proto.c
you can find an example how to get the pg_type values from the OID.

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


pgsql-general by date:

Previous
From: "a"
Date:
Subject: Re: How can I retrieve attribute category with attribute Oid in Cfunction?
Next
From: Yashwanth Govinda Setty
Date:
Subject: Recommended way to copy database files on Windows OS (to perform filesystem level backup)