Re: Coding question - Mailing list pgsql-hackers

From Ramanujam H S Iyengar
Subject Re: Coding question
Date
Msg-id BAY19-F28jEo0TOwk4D0002f2fa@hotmail.com
Whole thread Raw
In response to Coding question  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
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!



pgsql-hackers by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: Frequently updated tables
Next
From: Tom Lane
Date:
Subject: Spinlock assembly cleanup