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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: lodopidolo <dir(dot)postgresql(at)orencio(dot)org>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Call postgres PL/Python stored function from another PL/Python block.
Date: 2016-01-13 16:48:31
Message-ID: CAFj8pRDRd6Knub2rQ30WenCt=WmvAd7_oYyUaBxUHfVnRJJDmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

2016-01-13 16:47 GMT+01:00 lodopidolo <dir(dot)postgresql(at)orencio(dot)org>:

> Hello. It is possible to call al PL/Python stored function natively from
> another PL/Python function?
>

The function created by CREATE OR REPLACE FUNCTION statement can be called
only via special interface, or via SQL executor, so you cannot to call this
function directly from Python

Pavel

>
> Something like:
>
> create or replace function f1() returns text as $$
> return "hello"$$ language 'plpython3u';
>
> do $$begin
> ...
> t = f1()
> ...end;$$ language 'plpython3u';
>
>
> Regards.
>
> (this question has been made in
> http://stackoverflow.com/questions/34764665/call-postgres-pl-python-stored-function-from-another-pl-python-block
> too).
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message LOUBRADOU 2016-01-13 16:48:37 BDR install broken on Ubuntu 14.04
Previous Message Igal @ Lucee.org 2016-01-13 16:25:31 Re: plv8 binaries for PostgreSQL 9.5 on Windows