Re: Speedup generation of command completion tags

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Speedup generation of command completion tags
Дата
Msg-id CAApHDvqbTpcWeuvQVa9kS0TXtnoVc6i-brGJS=V-qDUnR3rgaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Speedup generation of command completion tags  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
On Mon, 12 Dec 2022 at 14:48, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Sun, 11 Dec 2022 at 11:05, Andres Freund <andres@anarazel.de> wrote:
> > What about moving make_completion_tag() to cmdtag.c? Then we could just get
> > the entire CommandTagBehaviour struct at once. It's not super pretty to pass
> > QueryCompletion to a routine in cmdtag.c, but it's not awful. And if we deem
> > it problematic, we could just pass qc->commandTag, qc->nprocessed as a
> > separate arguments.
>
> That seems like a good idea. I've renamed and moved the function in
> the attached. I also adjusted how the trailing NUL char is appended to
> avoid having to calculate len + 1 and append the NUL char twice for
> the most commonly taken path.

I've pushed the updated patch. Thanks for having a look.

David



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

Предыдущее
От: Paul Ramsey
Дата:
Сообщение: Re: [PATCH] random_normal function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error-safe user functions