1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-18 17:41:14 +03:00
postgres/src/pl/plpython/plpython_setof.sql
2003-06-30 18:31:42 +00:00

12 lines
213 B
SQL

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 plpythonu;