Re: How to form a self-defined TupleTableSlot

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: How to form a self-defined TupleTableSlot
Дата
Msg-id CA+TgmobnpJOgfFfNq5QQFo6Ed_W5r0StLFyzYa6tegKnQ=O_qw@mail.gmail.com
обсуждение исходный текст
Ответ на How to form a self-defined TupleTableSlot  (<Chaoyong.Wang@emc.com>)
Список pgsql-hackers
On Thu, Jul 26, 2012 at 11:39 PM,  <Chaoyong.Wang@emc.com> wrote:
> Here is my task situation:
>
> I have a TupleTableSlot, with its own TupleDesc. Now I want to extract
> several attributes to form a new TupleTableSlot, how can I define my own
> TupleDesc and the ProjectionInfo?

You might get more helpful advice if you describe more specifically
what you're trying to do.  I mean, here's one way to create a
TupleDesc (from contrib/adminpack) but it may or may not be suitable
for your purposes:
               tupdesc = CreateTemplateTupleDesc(2, false);               TupleDescInitEntry(tupdesc, (AttrNumber) 1,
"starttime",                                                 TIMESTAMPOID, -1, 0);
TupleDescInitEntry(tupdesc,(AttrNumber) 2, "filename",                                                  TEXTOID, -1,
0);

As ProjectInfo, maybe ExecBuildProjectionInfo?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: effective_io_concurrency
Следующее
От: Tom Lane
Дата:
Сообщение: Re: patch: shared session variables