Re: gsoc, store hash index tuple with hash code only

Поиск
Список
Период
Сортировка
От Xiao Meng
Тема Re: gsoc, store hash index tuple with hash code only
Дата
Msg-id ded849dd0807160329y456b6bbcj6270f7ad50459da0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: gsoc, store hash index tuple with hash code only  ("Xiao Meng" <mx.cogito@gmail.com>)
Список pgsql-hackers
A problem here is that _create_hash_desc is called many times to
create a TupleDesc with int32 attribute.
I've tried to implement the function like this ,
TupleDesc _create_hash_desc()
{   static bool firstcall = true;   static TupleDesc tupdesc;   if(firstcall){       tupdesc =
CreateTemplateTupleDesc(1,false);       TupleDescInitEntry(tupdesc, 1, "hashcode", INT4OID, -1, 0);   }   firstcall =
false;  return tupdesc;
 
}

but it failed because tupdesc is free later, IMHO.
Any advice?

-- 
Best Regards,
Xiao Meng

DKERC, Harbin Institute of Technology, China
Gtalk: mx.cogito@gmail.com
MSN: cnEnder@live.com
http://xiaomeng.yo2.cn


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

Предыдущее
От: "Xiao Meng"
Дата:
Сообщение: Re: gsoc, store hash index tuple with hash code only
Следующее
От: daveg
Дата:
Сообщение: Re: [PATCHES] pg_dump lock timeout