Search Postgresql Archives

Re: Call postgres PL/Python stored function from another PL/Python block.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux