From 0bef7ba549977154572bdbf5682a32a07839fd82 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Wed, 9 May 2001 19:54:38 +0000
Subject: Add plpython code.

---
 src/pl/plpython/plpython_setof.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 src/pl/plpython/plpython_setof.sql

(limited to 'src/pl/plpython/plpython_setof.sql')

diff --git a/src/pl/plpython/plpython_setof.sql b/src/pl/plpython/plpython_setof.sql
new file mode 100644
index 0000000000..7cbbeba4d8
--- /dev/null
+++ b/src/pl/plpython/plpython_setof.sql
@@ -0,0 +1,11 @@
+
+CREATE FUNCTION test_setof() returns setof text
+	AS
+'if GD.has_key("calls"):
+	GD["calls"] = GD["calls"] + 1
+	if GD["calls"] > 2:
+		return None
+else:
+	GD["calls"] = 1
+return str(GD["calls"])'
+	LANGUAGE 'plpython';
-- 
cgit v1.2.1

