Philipp Kraus <philipp.kraus (AT) flashpixx (DOT) de> wrote:
Quote:
I've written my first Stored Procedure with plPython (I had coded pgSQL
only). This is the function: |
[...]
Quote:
plpy.execute(loSQL, [lnSemesterID, lnNode], 1)
loRow = plpy.fetchone() |
[...]
Quote:
It's not finished, but how I can get the result? The fetchall /
fetchone raise an error. I can get one or no row from the table. |
I don't know anything about Python, but there is no fetchone() or
fetchall() function in pl/Python (judging from the source code).
The documentation says that
The result object emulates a list or dictionary object.
The result object can be accessed by row number and column name.
So plpy.execute *returns* a Python data structure that contains the results.
Regarding your second question, I don't know, but I think that you'll
have to use SQL to call one pl/Python function from another.
Yours,
Laurenz Albe