summaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql/plpython_setof.sql
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-07-05 18:15:51 +0000
committerBruce Momjian <bruce@momjian.us>2005-07-05 18:15:51 +0000
commit2d6c375c5f34948dc32221c3075265d73b561ee8 (patch)
tree89455c88fa2474af1aaee6dfebcbb49c5fe0f8ed /src/pl/plpython/sql/plpython_setof.sql
parent576ac4b8c9337cd5b0e12c2f827dd99c5ee6f25b (diff)
Back out patch. This should be done like other server-side languages.
--------------------------------------------------------------------------- This patch allows the PL/Python module to do (SRF) functions. The patch was taken from the CVS version. I have modified the plpython.c file and have added a test sql script for testing the functionality. It was actually the script that was in the 8.0.3 version but have since been removed. In order to signal the end of a set, the called python function must simply return plpy.EndOfSet and the set would be returned. Gerrit van Dyk
Diffstat (limited to 'src/pl/plpython/sql/plpython_setof.sql')
-rw-r--r--src/pl/plpython/sql/plpython_setof.sql12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/pl/plpython/sql/plpython_setof.sql b/src/pl/plpython/sql/plpython_setof.sql
deleted file mode 100644
index 6e157886728..00000000000
--- a/src/pl/plpython/sql/plpython_setof.sql
+++ /dev/null
@@ -1,12 +0,0 @@
-
-CREATE or replace FUNCTION test_setof() returns setof text
- AS
-'if GD.has_key("calls"):
- GD["calls"] = GD["calls"] + 1
- if GD["calls"] > 2:
- del GD["calls"]
- return plpy.EndOfSet
-else:
- GD["calls"] = 1
-return str(GD["calls"])'
- LANGUAGE plpythonu;