Re: Call postgres PL/Python stored function from another PL/Python block.
В списке pgsql-general по дате отправления:
| От | Jim Nasby |
|---|---|
| Тема | Re: Call postgres PL/Python stored function from another PL/Python block. |
| Дата | |
| Msg-id | 569682C2.9000202@BlueTreble.com обсуждение исходный текст |
| Ответ на | Call postgres PL/Python stored function from another PL/Python block. (lodopidolo <dir.postgresql@orencio.org>) |
| Список | pgsql-general |
On 1/13/16 9:47 AM, lodopidolo wrote:
> Hello. It is possible to call al PL/Python stored function natively from
> another PL/Python function?
Stackoverflow is stupid and won't let me post there, but here's what you
want:
There is no special capability to call other plpython functions. You
need to call them as you would any other Postgres function, ie:
do $$
begin
...
rv = plpy.execute("SELECT f1()")
t = rv[1]["f1]
...
end;
$$ language 'plpython3u';
See
http://www.postgresql.org/docs/9.5/static/plpython-database.html#AEN65599 for
more information.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера