postgresql/src/pl/plpython/plpython_setof.sql

12 lines
214 B
MySQL
Raw Normal View History

2001-05-09 15:54:38 -04:00
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';