make tuplestore helper function

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема make tuplestore helper function
Дата
Msg-id CAAKRu_azyd1Z3W_r7Ou4sorTjRCs+PxeHw1CWJeXKofkE6TuZg@mail.gmail.com
обсуждение исходный текст
Ответы Re: make tuplestore helper function  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: make tuplestore helper function  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
Attached is a patch to create a helper function which creates a
tuplestore to be used by FUNCAPI-callable functions.

It was suggested in [1] that I start a separate thread for this patch.

A few notes:

There are a few places with very similar code to the new helper
(MakeTuplestore()) but which, for example, don't expect the return type
to be a row (pg_ls_dir(), pg_tablespace_databases(), text_to_table()). I
wasn't sure if it was worth modifying it for their benefit.

I wasn't sure if the elog() check for call result type should be changed
to an ereport().

All callers of MakeTuplestore() pass work_mem as the third parameter, so
I could just omit it and hard-code it in, but I wasn't sure that felt
right in a utility/helper function.

I inlined deflist_to_tuplestore() in foreign.c since it was billed as a
helper function but wasn't used elsewhere and it made it harder to use
MakeTuplestore() in this location.

-- melanie

[1] https://www.postgresql.org/message-id/flat/20200124195226.lth52iydq2n2uilq%40alap3.anarazel.de

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: refactoring basebackup.c
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: should we enable log_checkpoints out of the box?