Thread: Coding question

Coding question

From
Christopher Kings-Lynne
Date:
If typTup is of type Form_pg_type, is this use of ObjectIdGetDatum legal?

tuple = SearchSysCache(RELOID, ObjectIdGetDatum(typTup->typrelid),
0,0, 0);
 

If not, how do I turn ->typrelid into an Oid type for safe passage
through ObjectIdGetDatum?

Chris




Re: Coding question

From
"Ramanujam H S Iyengar"
Date:
Hi,

I think replacing the RELOID with TYPEOID should get you the required Datum 
...
later you may have to use

Form_pg_type pform = (Form_pg_type) GETSTRUCT(tuple);

to get a reference to the type tuple.

I have worked this way but iam not sure whether this is correct or not !!
If iam wrong some body can correct me !!

-Ramu

If typTup is of type Form_pg_type, is this use of ObjectIdGetDatum legal?

tuple = SearchSysCache(RELOID, ObjectIdGetDatum(typTup->typrelid),
0,0, 0);
 

If not, how do I turn ->typrelid into an Oid type for safe passage
through ObjectIdGetDatum?

Chris

_________________________________________________________________
Contact brides & grooms FREE! http://www.shaadi.com/index.php?ptnr=hmltag 
Only on www.shaadi.com. Register now!