Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL
Дата
Msg-id CAFj8pRC=95QGCFN=nZ6GRb0fOZy7sae9MPwBAkn-vqoVSCBJjw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
 
Hi


I’m still hoping that I might get some pointers to whitepapers or blog posts that expand on those bullets that I quoted from the PG doc: «Instead of packages, use schemas to organize your functions into groups.» and «Since there are no packages, there are no package-level variables either. This is somewhat annoying. You can keep per-session state in temporary tables instead.»

I fixed a patch https://commitfest.postgresql.org/36/1608/ so you can check it.

Using temporary tables instead of session variables is not too practical. There are more alternative ways - a) one extension, b) using global variables from Perl, c) using global configuration variables.

The @c is most common today



Regards

Pavel
 

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

Предыдущее
От: Bryn Llewellyn
Дата:
Сообщение: Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL
Следующее
От: Matt Magoffin
Дата:
Сообщение: Freeing transient memory in aggregate functions