Re: It's possible to get pg_class oid from GETSTRUC macro?

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: It's possible to get pg_class oid from GETSTRUC macro?
Дата
Msg-id 4C1456AD.3020109@catalyst.net.nz
обсуждение исходный текст
Ответ на It's possible to get pg_class oid from GETSTRUC macro?  (Mohammad Heykal Abdillah <heykal.abdillah@gmail.com>)
Список pgsql-hackers
On 13/06/10 15:28, Mohammad Heykal Abdillah wrote: <blockquote cite="mid:1276399731.24212.42.camel@claudia"
type="cite"><prewrap="">After i read PostgreSQL documentation, i found that pg_attribute contain
 
"attrelid" that reference to pg_class oid. But after i look to
"/src/include/catalog/pg_class.h" there is no member named "oid".

This what i trying to acomplish using "heap_getnext" function:

if (((Form_pg_class) GETSTRUCT(ht_1)->oid) == ((Form_pg_attribute)
GETSTRUCT(ht_2)->attrelid)
{
//do something
}

But its always failed in compile time since pg_class doesnt have "oid"
member. And it seem "t_tableOid" was not pg_class oid since when i
compare "t_tableOid" and "(Form_pg_attribute) GETSTRUCT(ht_2)->attrelid"
nothing match.

My question is, how to get "oid" from pg_class? or is there any other
solution you can suggest?

Thank you. </pre></blockquote><font size="-1"><font face="Helvetica"><br /> Guess you could get the oid via:<br /><br
/>    HeapTupleGetOid(h_1);<br /><br /> regards<br /><br /> Mark<br /><br /></font></font> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mohammad Heykal Abdillah
Дата:
Сообщение: It's possible to get pg_class oid from GETSTRUC macro?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Proposal for 9.1: WAL streaming from WAL buffers